
Failed to execute script 'main' due to unhandled exception! TypeError: 'NoneType' object is not callable

Could that be the problem? And if so, where can I find a 64-bit version of cv2.When trying to run an exe I made using pyinstaller it fails while importing OpenGL with this traceback: (env) C:\Users\me\myProject>.\dist\myProject\myProject.exeįile "", line 967, in _find_and_load_unlockedįile "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_moduleįile "OpenGL\GL\_init_.py", line 3, in įile "OpenGL\platform\_init_.py", line 36, in įile "OpenGL\platform\_init_.py", line 30, in _load I just noticed that, according to, the cv2.pyd in C:\lib\opencv\build\python\2.7 is 32-bit, whereas the machine and the Python I'm running are 64-bit. And my OpenCV installation doesn't have any Release folders (except for an empty one under build/java).Īny ideas as to what's going wrong? Can I tell Python to verbosely trace the loading process? Exactly what DLL's is it looking for? But as shown above, I already have the OpenCV binaries folder ( C:\lib\opencv\build\圆4\vc11\bin) in my PATH. The solution at ImportError: DLL load failed: %1 is not a valid Win32 application says to add "the new opencv binaries path ( C:\opencv\build\bin\Release) to the Windows PATH environment variable". OPENCV_DIR has this value: OPENCV_DIR=C:\lib\opencv\build\圆4\vc11. This folder contains 39 DLL files such as opencv_core246d.dll. This folder contains cv2.pyd and that's all. My PYTHONPATH variable: PYTHONPATH=C:\lib\opencv\build\python\2.7.

I have OpenCV installed in C:\lib\opencv on this 64-bit machine. I have a situation very much like the one at ImportError: DLL load failed: %1 is not a valid Win32 application, but the answer there isn't working for me.īut that line throws the error shown in the title of this question.
