vrajroham / python-xbee

Automatically exported from code.google.com/p/python-xbee
MIT License
0 stars 0 forks source link

IndexError: pop from empty list #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. running dispatch_async.py
2. print "Samples Received: ", packet['samples']
3.

What is the expected output? What do you see instead?
- error on thread but program continues to run...
- 

What version of the product are you using? On what operating system?
XBee 2.1.0
Linux version 3.6.11+ (on Raspberry pi)

Please provide any additional information below:

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 364, in _parse_samples
    analog_sample = (sample_bytes.pop(0) << 8 | sample_bytes.pop(0))
IndexError: pop from empty list

Original issue reported on code.google.com by ch...@freeranger.com on 13 Apr 2014 at 8:29