[issue1384175] random module - Provider DLL failed to initialize correctly

Albert Zeyer report at bugs.python.org
Fri Aug 21 12:01:09 CEST 2015


Albert Zeyer added the comment:

Note that there are still people who get this error in some strange cases, me included.

E.g.:
http://stackoverflow.com/questions/27904936/python-exe-file-crashes-while-launching-on-windows-xp/32137554#32137554

This happened at a call to `os.urandom` for me.
This was in a subprocess.

The bug for me was that I called `_subprocess.CreateProcess` with an `env_mapper = {'foo': 'bar'}`. The fix:

    env_mapper = os.environ.copy()
    env_mapper.update({'foo': 'bar'})

There is another related question [here](http://stackoverflow.com/questions/21791005/windows-error-provider-dll-failed-to-initialize-correctly-on-import-of-cgi-mo).
And some discussion on [this GitHub issue](https://github.com/aws/aws-cli/issues/1226).
All those seem to be related to `crypt32.dll` in a frozen Python app, or via py2app.

----------
nosy: +Albert.Zeyer

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1384175>
_______________________________________


More information about the Python-bugs-list mailing list