JessicaTegner / PyAL

A PyAl wrapper for Python 3 with HRTF, 3d audio support, efx and ext
https://pyopenal.readthedocs.io/en/latest/
Other
18 stars 9 forks source link

AttributeError: module 'openal.al' has no attribute 'ALuint' #10

Open andresubagjamanurung opened 4 years ago

andresubagjamanurung commented 4 years ago

I can't execute the OpenAL_3D.py, because it said module 'openal.al' has no attribute 'ALuint'. I'm new to this, can you tell me how I suppose to run the example? Thank you

Usage: openal_3d.py wavefile Using an example wav file... Traceback (most recent call last): File "openal_3d.py", line 246, in <module> Example() File "openal_3d.py", line 24, in __init__ self.sound = load_sound('tone5.wav') File "openal_3d.py", line 111, in __init__ self.buf = al.ALuint(0) AttributeError: module 'openal.al' has no attribute 'ALuint' AL lib: (EE) alc_cleanup: 1 device not closed

8Observer8 commented 5 months ago

I had the same error because I had PyOpenAL installed. I have removed it: pip uninstall PyOpenAL

But now I have another error:

python OpenAL_3D.py
Traceback (most recent call last):
  File "OpenAL_3D.py", line 8, in <module>
    from openal import al, alc
  File "E:\ProgramFiles\Python\Python38\lib\site-packages\openal\__init__.py", line 82, in <module>
    dll = _DLL("OpenAL", {"win32": ["OpenAL", "OpenAL32"], "darwin": ["OpenAL"], "DEFAULT": ["openal", "OpenAL"]}, getattr(os.getenv, "PYAL_DLL_PATH", os.getcwd()))
  File "E:\ProgramFiles\Python\Python38\lib\site-packages\openal\__init__.py", line 54, in __init__
    self._dll = ctypes.CDLL(libfile)
  File "E:\ProgramFiles\Python\Python38\lib\ctypes\__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application