Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dev/urandom - strerror: file not accessible

I am using google app engine to create an app that accesses the prediction api. I am able to run the app when I update it on the website, however I am not able to run it on localhost:8080.

I am an absolute noob, any help is highly appreciated.

Here's the error:

<type 'exceptions.IOError'>: [Errno 13] file not accessible: '/dev/urandom'
  args = (13, 'file not accessible')
  errno = 13
  filename = '/dev/urandom'
  message = ''
  strerror = 'file not accessible' 
like image 849
Madhu Kiran Avatar asked Aug 25 '26 00:08

Madhu Kiran


1 Answers

How are you accessing /dev/urandom? That file is not accessible in production and should not be accessible in the dev_appserver. If you want to generate random data, use os.urandom() which will work correctly in both the local and production environments.

like image 114
Anand Mistry Avatar answered Aug 28 '26 06:08

Anand Mistry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!