This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: socket line 46 import _socket Import Error
Type: Stage:
Components: Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Joshex
Priority: normal Keywords:

Created on 2021-05-20 17:52 by Joshex, last changed 2022-04-11 14:59 by admin.

Messages (4)
msg394043 - (view) Author: Joshex (Joshex) Date: 2021-05-20 17:52
I assume someone has already fixed this problem, as I am using a very old version of python compatible with my version of blender. Though after searching, I found results for the same error message only a month or 2 ago.

anyways, my version of python 2.6.2 is out of support. but I assume if this has recently been fixed for more recent python modules, the same sort of fix could be applied to my install.

The problem is, I am on 64 bit windows 7 with 64 bit python 2.6.2 installed to use blender 2.49b. I have a 32 bit computer and verified the error does not appear when importng the socket module there! only on my 32 bit computer., I tried uninstalling 64 bit python from C:\Python26 and reinstalling to C:\Program Files (x86)\Python26. I have updated the system environment variables, to include this in the python path.

and I still get 
"C:\Program Files (x86)\Python26\LIB\socket.py", line 46, in <module> 
import _socket 
ImportError: DLL load failed: %1 is not a valid Win32 application

I would be happy if someone remembered the fix for this so I could apply it myself.
msg394044 - (view) Author: Joshex (Joshex) Date: 2021-05-20 17:54
sorry: edit, it only appears on my 64 bit computer
msg394046 - (view) Author: Joshex (Joshex) Date: 2021-05-20 18:20
Same error when importing Tkinter

it looks like any python module that tries to import a DLL fails because it forgets it should be looking for a 64 bit dll and instead goes looking for a 32 bit DLL and when it finds out it's 64 it throws a tantrum.
msg394047 - (view) Author: Joshex (Joshex) Date: 2021-05-20 18:33
LOL! the issue does not happen if I uninstall the 64 bit python install the 32 bit python and change the environment variables for the python path to the 32 bit folders. 

so it's a problem with 64 bit python. good thing I have the 32 bit as a backup.
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88359
2021-05-20 18:33:01Joshexsetmessages: + msg394047
2021-05-20 18:20:37Joshexsetmessages: + msg394046
2021-05-20 17:54:04Joshexsetmessages: + msg394044
2021-05-20 17:52:19Joshexcreate