classification
Title: random module - Provider DLL failed to initialize correctly
Type: Stage:
Components: Windows Versions: 3rd party
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, georg.brandl, ghazel, loewis, ssb22
Priority: normal Keywords:

Created on 2005-12-18 01:18 by ghazel, last changed 2009-02-15 19:00 by ssb22. This issue is now closed.

Messages (8)
msg60852 - (view) Author: Greg Hazel (ghazel) Date: 2005-12-18 01:18
   File "random.pyc", line 828, in ?
   File "random.pyc", line 95, in __init__
   File "random.pyc", line 109, in seed
 WindowsError: [Errno -2146893795] Provider DLL failed 
to initialize correctly



msg60853 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-12-18 11:00
Logged In: YES 
user_id=1188172

Could you provide some more information? OS specs, Python
version, reproducability etc.
msg60854 - (view) Author: Greg Hazel (ghazel) Date: 2005-12-30 07:06
Logged In: YES 
user_id=731668

Windows XP, python 2.4.2
Not sure how to reproduce it.
msg60855 - (view) Author: Greg Hazel (ghazel) Date: 2006-03-05 01:06
Logged In: YES 
user_id=731668

This time from Windows 98 SE:

  File "random.pyc", line 828, in ?
  File "random.pyc", line 95, in __init__
  File "random.pyc", line 109, in seed
WindowsError: [Errno -2146893818] Windows Error 0x80090006
msg60856 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-07-24 13:14
Logged In: YES 
user_id=21627

The errors are actually different. The first one is

0x8009001d: NTE_PROVIDER_DLL_FAIL (Provider DLL failed to
initialize correctly) 

and the second one is

0x80090006: NTE_BAD_SIGNATURE (Invalid Signature)

For the second error, please check whether

http://support.microsoft.com/default.aspx?scid=kb;en-us;811886

applies. For the first error, I only found

http://support.microsoft.com/default.aspx?scid=kb;en-us;321459

but I doubt it's relevant.

In any case, I'm tempted to declare this a Windows bug.
msg81445 - (view) Author: Daniel Diniz (ajaksu2) Date: 2009-02-09 06:54
Given MvL's diagnostics and lack of response from OP, suggest closing.
msg82161 - (view) Author: Silas S. Brown (ssb22) Date: 2009-02-15 17:15
I got a very similar error on an Otek Pocket PC running Windows Mobile
2003 SE and the latest version of pythonce from
pythonce.sourceforge.net.  The error is:

File
"C:\devl\release\PythonCE-2.5-20061219\Python-2.5-wince\Lib\random.py",
line 108, in seed
<type 'exceptions.WindowsError'>: [Error 87] Provider DLL failed to
initialize correctly

Although this was thrown up at the "import random" at the start of my
program, the actual change I made that resulted in this error was much
later in the program, and it was to change the lines

            try: justSynthesize=raw_input("Say: ")
            except EOFError: break

into

            try:
justSynthesize=raw_input(cond(winCEsound,"".join(warnings_printed)+cond(warnings_printed,"\n",""),"")+"Say:
") # (WinCE uses an input box so need to repeat the warnings if any)
            except EOFError: break

where "cond" is an "if a then b else c" function.

A little more investigation showed that the culprit was the comment! 
Removing the comment after the raw_input() call (or putting it on a
different line) causes the program to work again.

I confirmed that adding any raw_input() call to any function, with a
prompt parameter and a comment afterwards, causes this error to happen
on the "import random" near the top of the program.  This is a very
strange bug.
msg82166 - (view) Author: Silas S. Brown (ssb22) Date: 2009-02-15 19:00
After further investigation I'm suspecting that this issue is actually
due to the process running out of RAM.
History
Date User Action Args
2009-02-15 19:00:58ssb22setmessages: + msg82166
2009-02-15 17:15:11ssb22setnosy: + ssb22
messages: + msg82161
2009-02-09 07:16:18loewissetstatus: open -> closed
resolution: works for me
versions: + 3rd party, - Python 2.4
2009-02-09 06:54:52ajaksu2setnosy: + ajaksu2
messages: + msg81445
2005-12-18 01:18:11ghazelcreate