> No, that was pretty much what I was looking for. If anyone has an answer
> to the deeper question, that would be icing on the cake.
> What is interesting is that usually the traceback shows the line of code
> that I invoke which, deep inside a library I'm using, has generated an
> error. In this case I don't know which of my commands has spawned the
> I can experiment, I suppose, with putting a try/catch around suspected
> lines of code...
It looks like the xbee library is responsible for reading the right amount
of bytes and then fails to parse them properly.
So it is possible (even likely I think) that you have run into a bug in the
A report to the author/maintainer should be in order. Of course it would
help if you can find a way to reproduce the error. One way to do that is to
modify the code
def _parse_samples(self, io_bytes):
... # original code of the method
# replace path with something that makes sense on your system
with open("/path/to/io_bytes.data", "wb") as f:
wait until the error occurs again and then send the contents of the
io_bytes.data file along with your bug report.