Author virtuald
Recipients virtuald
Date 2017-01-08.16:50:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I haven't dug into this very deeply yet, so I'm seeking some clarity on this issue before doing so.

According to my reading of PEP 522 (, BlockingIOError will be raised in security sensitive APIs, but not when just importing the random module. However, it seems that this is not actually the case:

BlockingIOError: [Errno 11] Resource temporarily unavailable 
 The above exception was the direct cause of the following exception: 
 Traceback (most recent call last): 
   File "/home/lvuser/py/", line 15, in <module> 
     import wpilib 
   File "/usr/local/lib/python3.6/site-packages/wpilib/", line 72, in <module> 
     from ._impl.main import run 
   File "/usr/local/lib/python3.6/site-packages/wpilib/_impl/", line 7, in <module> 
     from pkg_resources import iter_entry_points 
   File "/usr/local/lib/python3.6/site-packages/pkg_resources/", line 36, in <module> 
     import email.parser 
   File "/usr/local/lib/python3.6/email/", line 12, in <module> 
     from email.feedparser import FeedParser, BytesFeedParser 
   File "/usr/local/lib/python3.6/email/", line 27, in <module> 
     from email._policybase import compat32 
   File "/usr/local/lib/python3.6/email/", line 9, in <module> 
     from email.utils import _has_surrogates 
   File "/usr/local/lib/python3.6/email/", line 28, in <module> 
     import random 
   File "/usr/local/lib/python3.6/", line 742, in <module> 
     _inst = Random() 
 SystemError: <class 'random.Random'> returned a result with an error set 

Background: I'm the maintainer of the RobotPy project, which allows students to use Python to control their robots in the FIRST Robotics competition. The robot controller we use is an NI roboRIO, which is powered by an ARM cortex-a9.

This error was encountered when the robot is booting up with a python program. Presumably the program is started early enough in the boot process where the urandom blocking issue mentioned in the PEP occurs.

I'd love some help figuring out what's going on here, and the best way to fix it. Thanks!

I'm also tracking this issue at
Date User Action Args
2017-01-08 16:50:12virtualdsetrecipients: + virtuald
2017-01-08 16:50:12virtualdsetmessageid: <>
2017-01-08 16:50:12virtualdlinkissue29208 messages
2017-01-08 16:50:12virtualdcreate