import of uuid module causes error on windows
Closed, InvalidPublic


just type "import uuid" at python console.

Error pops up:

"An application has made an attempt to load the C runtime
library incorrectly. Please contact the application's support
team for more information"



This was also reported in [#27666], there it is suggested to remove ctypes code from the python uuid module to prevent the popup from showing. Note that the module keeps on functioning properly even after the popup.

Strange, it happens with recent 2.61beta build but not happen with build from buildbot. Maybe it's some differences in build configurations which are pretty simple to change? :)

The difference with official vs buildbot is that the buildbot builds don't have the msvc runtime dlls included. This may be the cause for the error. If the user has the runtime dlls installed themselves the bundled onces could be deleted after which this error won't happen anymore.

Copying the system DLLs over from C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57 also fixes this problem. Seems like a simple fix for the official builds.

Both msvcr90.dll files have the same version number and creation timestamp, but the system's one is 11KB larger than Blender's and was signed three hours later...

I am not sure how to fix this. I have several msvcr90.dll files on my computer, and they indeed have different sizes. The ones I bundle with releases and the recent RC builds for 2.64 come from the Visual Studio redist folder (example C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT).

No idea what to do with this? Would campbell know? What is this uuid thing, is that officially supported?

no idea :S, but `uuid` module is standard python, so it should work.

I gather this is more a windows linking issue, python dynamic loads a C python module (just dynamic loading a library)
which happens to cause a conflict with with the DLL blender is running (and shows a popup), probably to do fix this would need to rebuild python or change the DLL blender is used with.
IIRC we can't distribute MSVCRT so we rely on the user having it, but this means its hard for us to fix on our side.

The MSVCRT DLLs are already bundled (as Thomas D already mentions). I think this is a problem with that the DLLs *are* in the directory. Perhaps some side-by-side or similar error? Note that the uuid module works otherwise fine, despite the error message.

I am closing this, its unclear why there are different .dll versions of these files. The ones we bundle seem to work for regular Blender work.

Thomas Dinges (dingto) closed this task as Invalid.Nov 20 2012, 7:05 PM