Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71637

IndexError: pop from empty list

Newsgroups comp.lang.python
Date 2014-05-15 21:36 -0700
Message-ID <960b2711-6ed5-4a31-845b-7d15e39c9cf2@googlegroups.com> (permalink)
Subject IndexError: pop from empty list
From chris@freeranger.com

Show all headers | View raw


Any ideas about what this might mean?

Running Debian Wheezy on a RaspBerry Pi and collecting data on a dispatch thread that is reading input on the serial port (connected to xbee series 1).

It happens every few days but it really chokes the program.

Thanks for any tips,
ChrisJ




Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/xbee/base.py", line 95, in run
    self._callback(self.wait_read_frame())
  File "/usr/local/lib/python2.7/dist-packages/xbee/base.py", line 400, in wait_read_frame
    return self._split_response(frame.data)
  File "/usr/local/lib/python2.7/dist-packages/xbee/base.py", line 288, in _split_response
    info[parse_rule[0]] = parse_rule[1](self, info)
  File "/usr/local/lib/python2.7/dist-packages/xbee/ieee.py", line 117, in <lambda>
    lambda xbee,original: xbee._parse_samples(original['samples'])
  File "/usr/local/lib/python2.7/dist-packages/xbee/base.py", line 357, in _parse_samples
    digital_data_set = (sample_bytes.pop(0) << 8 | sample_bytes.pop(0))
IndexError: pop from empty list

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

IndexError: pop from empty list chris@freeranger.com - 2014-05-15 21:36 -0700
  Re: IndexError: pop from empty list Gary Herron <gary.herron@islandtraining.com> - 2014-05-15 21:48 -0700
    Re: IndexError: pop from empty list chris@freeranger.com - 2014-05-15 22:08 -0700
      Re: IndexError: pop from empty list Peter Otten <__peter__@web.de> - 2014-05-16 10:15 +0200
  Re: IndexError: pop from empty list Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-16 06:41 +0000

csiph-web