Interrupted system call

Peter Bell peter at
Sun Nov 16 09:11:16 CET 2014


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/", line 
461, in read
     ready,_,_ =[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 "./", line 36, in <module>
     picasso.putstr(strftime("%a, %d %b %Y %X"),1,1)
   File "/root/", line 44, in putstr
   File "/usr/lib/python3.4/site-packages/serial/", 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.

More information about the Python-list mailing list