“Windows Error: provider DLL failed to initialize correctly” on import of cgi module in frozen wxpython app

前端 未结 3 837
遥遥无期
遥遥无期 2021-01-18 06:41

I have a user of a frozen wxpython app that gets the appended screenshot.

The error message is \"Windows Error: provider DLL failed to initialize correctly\"

3条回答
  •  长情又很酷
    2021-01-18 07:36

    This seems to occur somewhere inside os.urandom and is probably caused by some missing or incorrect environment variables. In particular it happens if the environment is too long.

    • If you are starting Python from a shell, open a new shell and try again. If the problem persists, check if there are unusually many environment variables
    • If you are starting Python from another process, check if the proces environment is set up correctly. I found that this is often not the case for processes run by Apache's CGI module.

    if you are starting Python as a CGI process, then you may want to consider better alternatives, such as mod_wsgi.

提交回复
热议问题