I am testing out an app in GAE. It runs fine when deployed to Google's server, but locally it crashes because it cannot import name RAND_egd
. The place where it happens is in C:\Program Files(x86)Google\google_appengine\google\appengine\dist27\socket.py line 73:
from _ssl import RAND_add, RAND_egd, RAND_status, SSL_ERROR_ZERO_RETURN, SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE, SSL_ERROR_WANT_X509_LOOKUP, SSL_ERROR_SYSCALL, SSL_ERROR_SSL, SSL_ERROR_WANT_CONNECT, SSL_ERROR_EOF, SSL_ERROR_INVALID_ERROR_CODE
According to this SO answer, the solution is to comment out the import, but that was in the standard socket.py
. I removed RAND_egd
from the Google supplied file, and it worked, for now.
What is the proper solution to this problem? Will RAND_egd always be not needed in socket.py? Is that Google supplied socket.py not the same as the one in Google's web servers?