On Sun, Nov 16, 2014 at 7:11 PM, Peter Bell <pe...@bellfamily.org.uk> wrote:
>   File "/usr/lib/python3.4/site-packages/serial/serialposix.py", line 480,
> in read
>     if e[0] != errno.EAGAIN:
> TypeError: 'InterruptedError' object is not subscriptable
> =====================================================================
>
>
> I'm not sure how to address the 'InterruptedError'.  Can it/should it be
> masked at the user code level with a 'try:' block?  Or is there another way
> to deal with it?

At this stage, you're not getting it, because of the cascaded error,
so that's the thing to deal with.

> I presume that the subsequent error (TypeError) indicates some fault in the
> system level library.  I'm not sure where/how to report this.

Not system-level. According to the traceback, that's coming from line
480 of something in site-packages, which probably means it was
installed with pip or equivalent. Do you know where you got hold of
this module from? That's who to report this to.

It's trying to retrieve the errno from the exception. I suspect the
code was written for Python 2, and you're using it with Python 3. It's
probably possible to shorten/simplify the code somewhat.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to