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


Groups > comp.lang.python > #80923 > unrolled thread

Re: Interrupted system call

Started byChris Angelico <rosuav@gmail.com>
First post2014-11-17 09:13 +1100
Last post2014-11-17 09:13 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Interrupted system call Chris Angelico <rosuav@gmail.com> - 2014-11-17 09:13 +1100

#80923 — Re: Interrupted system call

FromChris Angelico <rosuav@gmail.com>
Date2014-11-17 09:13 +1100
SubjectRe: Interrupted system call
Message-ID<mailman.15915.1416176041.18130.python-list@python.org>
On Sun, Nov 16, 2014 at 7:11 PM, Peter Bell <peter@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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web