1
$\begingroup$

I was trying to install the Blender Cloud addon and got a python error. It looks like it is trying to load the socket library but is failing. If I go to the Blender directory and run the python console from the command line, I can do an import with no error, but I cannot from the Blender python console. It is the same python installation since I have no installation external to Blender. Here is the result of an import socket from the Blender python console:

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "C:\Program Files\Blender Foundation\Blender\2.78\python\lib\socket.py", line 49, in <module>
    import _socket
ImportError: DLL load failed: %1 n’est pas une application Win32 valide.

So it's an invalid win32 DLL, it says. The entire call when installing the addon (it's mostly the same thing):

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\modules\addon_utils.py", line 330, in enable
    mod = __import__(module_name)
  File "C:\Users\nicolas\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\__init__.py", line 48, in <module>
    wheels.load_wheels()
  File "C:\Users\nicolas\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\wheels\__init__.py", line 64, in load_wheels
    load_wheel('lockfile', 'lockfile')
  File "C:\Users\nicolas\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\wheels\__init__.py", line 48, in load_wheel
    module = __import__(module_name)
  File "C:\Users\nicolas\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\wheels\lockfile-0.12.2-py2.py3-none-any.whl\lockfile\__init__.py", line 58, in <module>
    import socket
  File "C:\Program Files\Blender Foundation\Blender\2.78\python\lib\socket.py", line 49, in <module>
    import _socket
ImportError: DLL load failed: %1 n’est pas une application Win32 valide.

I'm running a Windows 10 64bits and Blender 2.78. Any idea?

$\endgroup$
6
  • $\begingroup$ are you running a x64 version of Blender for windows? latest 2.79 builds from builder.blender.org import socket no problem. $\endgroup$
    – zeffii
    Aug 31, 2017 at 8:12
  • $\begingroup$ also.. does your Blender Python console say something like PYTHON INTERACTIVE CONSOLE 3.5.3 (default, May 20 2017, 19:10:40) [MSC v.1800 64 bit (AMD64)] ? $\endgroup$
    – zeffii
    Aug 31, 2017 at 8:13
  • $\begingroup$ @zeffii 2.78c x64 version, yes. Funny, in 2.79, it works properly, just like you, but not in 2.78c 2.78c says: PYTHON INTERACTIVE CONSOLE 3.5.2 (default, Dec 1 2016, 20:58:16) [MSC v.1800 64 bit (AMD64)] 2.79 says: PYTHON INTERACTIVE CONSOLE 3.5.3 (default, May 20 2017, 19:10:40) [MSC v.1800 64 bit (AMD64)] $\endgroup$
    – Kiskit
    Aug 31, 2017 at 20:44
  • $\begingroup$ Tried to download a portable 2.78 so that I'm sure it hasn't been altered by any weird operation afterwards. Portable fails the test too. So I'm probably going to use 2.79 until it becomes the official version, at least for my Blender Cloud needs. Thanks for your help. $\endgroup$
    – Kiskit
    Aug 31, 2017 at 21:13
  • $\begingroup$ Sometimes the official release builds don't get everything right. I'm not sure it makes sense to submit a bug report because the add-on is fine, and whatever Python compiling problem was experienced for 2.78c has been resolved in 2.79. Unless you have something super critical consider using 2.79 builds . $\endgroup$
    – zeffii
    Sep 1, 2017 at 8:52

1 Answer 1

0
$\begingroup$

Try the following:

  • Close Blender
  • Rename C:\Users\YourNameHere\AppData\Roaming\Blender
    Foundation\Blender\2.79
    to
    C:\Users\YourNameHere\AppData\Roaming\Blender
    Foundation\Blender\2.79.bak
  • Use your login in Windows instead of YourNameHere and your version of Blender instead of 2.79
  • Start Blender again
$\endgroup$
7
  • $\begingroup$ I see you posted to of the exact same answer, which is fine, just be sure it really answers the questions. (There are very few cases where the question is not a dup and a simple copy paste will answer it.) $\endgroup$
    – David
    Apr 11, 2018 at 2:45
  • $\begingroup$ My subscription has expired so I won't know if it works or not :) $\endgroup$
    – Kiskit
    Apr 11, 2018 at 11:57
  • $\begingroup$ @David, yes the same solution for the same problem DLL load failed: %1 is not a valid Win32 application $\endgroup$
    – vvoovv
    Apr 12, 2018 at 7:10
  • $\begingroup$ @Kiskit, was it a joke? Blender is free and open source. $\endgroup$
    – vvoovv
    Apr 12, 2018 at 7:11
  • $\begingroup$ Blender Cloud is not $\endgroup$
    – Kiskit
    Apr 13, 2018 at 11:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .