You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally reported by: Roger Flores (Bitbucket: rallant92, GitHub: rallant92)
I installed the 64 bit sdl2 DLLs for my Win 7 x64 OS. Running (draw.py) reported
ImportError: could not load any library for SDL2
After some tracking, I figured out the Python was 32 bit, which can't use 64 bit libs. Specifically, exc at dll.py:57 is "[Error 193] %1 is not a valid Win32 application", raised from CDLL().
The import feedback could be more helpful. Mentioning that a dll file was found but not usable/suitable makes it clear that path issues aren't the source of the problem. So change dll.py:61 to
raise RuntimeError("found %s but it's not usable for the libary %s" % (foundlibs, libinfo))
dll.py:50 could become:
raise RuntimeError("searched %s but could not find any library for %s" % (path, libinfo))
It would also help to mention PYSDL2_DLL_PATH when there's a problem and it's unset so that people know about it.
dll.py:101:
if os.getenv("PYSDL2_DLL_PATH") == None:
exc = exc.message + " (and PYSDL2_DLL_PATH is unset)";
Originally reported by: Roger Flores (Bitbucket: rallant92, GitHub: rallant92)
I installed the 64 bit sdl2 DLLs for my Win 7 x64 OS. Running (draw.py) reported
ImportError: could not load any library for SDL2
After some tracking, I figured out the Python was 32 bit, which can't use 64 bit libs. Specifically, exc at dll.py:57 is "[Error 193] %1 is not a valid Win32 application", raised from CDLL().
The import feedback could be more helpful. Mentioning that a dll file was found but not usable/suitable makes it clear that path issues aren't the source of the problem. So change dll.py:61 to
raise RuntimeError("found %s but it's not usable for the libary %s" % (foundlibs, libinfo))
dll.py:50 could become:
raise RuntimeError("searched %s but could not find any library for %s" % (path, libinfo))
It would also help to mention PYSDL2_DLL_PATH when there's a problem and it's unset so that people know about it.
dll.py:101:
if os.getenv("PYSDL2_DLL_PATH") == None:
exc = exc.message + " (and PYSDL2_DLL_PATH is unset)";
The text was updated successfully, but these errors were encountered: