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


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

Interrupted system call

Started byPeter Bell <peter@bellfamily.org.uk>
First post2014-11-16 16:11 +0800
Last post2014-11-16 16:11 +0800
Articles 1 — 1 participant

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


Contents

  Interrupted system call Peter Bell <peter@bellfamily.org.uk> - 2014-11-16 16:11 +0800

#80897 — Interrupted system call

FromPeter Bell <peter@bellfamily.org.uk>
Date2014-11-16 16:11 +0800
SubjectInterrupted system call
Message-ID<mailman.15895.1416169223.18130.python-list@python.org>
Hi,

I'm new to Python, using Python3 on RaspberryPi/ArchLinux for a home 
automation project.

I started off with interfacing an LCD screen (serial interface) and have 
this working reasonably well.

Then I received a couple of interface boards.  I attached one of these, 
together with the serial interface for the LCD.

Even without loading (importing) any support libraries for the new 
interface board, the code which was running perfectly well before is now 
producing an error:

=====================================================================
Traceback (most recent call last):
   File "/usr/lib/python3.4/site-packages/serial/serialposix.py", line 
461, in read
     ready,_,_ = select.select([self.fd],[],[], self._timeout)
InterruptedError: [Errno 4] Interrupted system call

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "./water.py", line 36, in <module>
     picasso.putstr(strftime("%a, %d %b %Y %X"),1,1)
   File "/root/picasso.py", line 44, in putstr
     port.read(1)
   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?

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

Any advice would be appreciated.

-- 
-------------------------------------------------------------------
Peter Bell
Tagum City, Philippines.

[toc] | [standalone]


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


csiph-web