Akash Akash - 1 month ago 22
Python Question

VLC Python Bindings -- Error 193

Have downloaded VLC.py, and placed it in my VLC install directory, where libvlc.dll is also present

On typing

import vlc


I get the following error


Traceback (most recent call last):

File "C:\Program Files
(x86)\VideoLAN\VLC\vlc.py", line 88,
in
dll = ctypes.CDLL('libvlc.dll') File
"C:\Python27\lib\ctypes__init__.py",
line 353, in init
self._handle = _dlopen(self._name, mode) WindowsError: [Error 193] %1 is
not a valid Win32 application


Any ideas why?

If needed, my config is:
Win7 pro 64 bit
4GB RAM

Answer

Reposting my comment as an answer, since it fixed the problem:

I'm going to guess that the problem is trying to load a 32-bit DLL from a 64-bit process. You may be able to fix it by using a 32-bit Python build.