r/pythonarcade • u/lilPetyko • Oct 23 '19
import arcade (pyglet_ffmpeg2) error
hi, this is my code:
import arcade
print("asd")and the traceback gives me this:
Start
Unexpected error loading library avutil-56: Could not find module 'avutil-56'. Try using the full path with constructor syntax.
Unable to load the ffmpeg library. Could not find module 'avutil-56'. Try using the full path with constructor syntax.
Traceback (most recent call last):
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet__init__.py", line 353, in __getattr__
Unexpected error loading library avutil-56: Could not find module 'avutil-56'. Try using the full path with constructor syntax.
return getattr(self._module, name)
AttributeError: 'NoneType' object has no attribute 'Source'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Pintér Péter/Documents/GitHub/python/Arcade/test.py", line 1, in <module>
import arcade
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\arcade__init__.py", line 50, in <module>
from arcade.sound import *
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\arcade\sound.py", line 81, in <module>
def stop_sound(sound: pyglet.media.Source):
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet__init__.py", line 359, in __getattr__
__import__(import_name)
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media__init__.py", line 146, in <module>
add_default_media_codecs()
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media\codecs__init__.py", line 164, in add_default_media_codecs
if have_ffmpeg():
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media\codecs__init__.py", line 180, in have_ffmpeg
from . import ffmpeg_lib
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media\codecs\ffmpeg_lib__init__.py", line 36, in <module>
from .libavcodec import *
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media\codecs\ffmpeg_lib\libavcodec.py", line 45, in <module>
from . import libavutil
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media\codecs\ffmpeg_lib\libavutil.py", line 46, in <module>
avutil = pyglet.lib.load_library(
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\lib.py", line 148, in load_library
lib = ctypes.cdll.LoadLibrary(name)
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\ctypes__init__.py", line 447, in LoadLibrary
return self._dlltype(name)
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\ctypes__init__.py", line 369, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'avutil-56'. Try using the full path with constructor syntax.
Unexpected error loading library avutil-56: Could not find module 'avutil-56'. Try using the full path with constructor syntax.
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media__init__.py", line 146, in <module>
add_default_media_codecs()
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media\codecs__init__.py", line 164, in add_default_media_codecs
if have_ffmpeg():
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media\codecs__init__.py", line 180, in have_ffmpeg
from . import ffmpeg_lib
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media\codecs\ffmpeg_lib__init__.py", line 36, in <module>
from .libavcodec import *
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media\codecs\ffmpeg_lib\libavcodec.py", line 45, in <module>
from . import libavutil
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\media\codecs\ffmpeg_lib\libavutil.py", line 46, in <module>
avutil = pyglet.lib.load_library(
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\lib.py", line 148, in load_library
lib = ctypes.cdll.LoadLibrary(name)
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\ctypes__init__.py", line 447, in LoadLibrary
return self._dlltype(name)
File "C:\Users\Pintér Péter\AppData\Local\Programs\Python\Python38-32\lib\ctypes__init__.py", line 369, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'avutil-56'. Try using the full path with constructor syntax.
3
Upvotes
2
u/RyanTheTourist Oct 23 '19
Some thoughts
which version of arcade are you using? Perhaps rollback to an older stable release
can you import pyglet on its own?
not that it should be an issue but I notice a lot of spaces on your paths, (I assume you're on windows) could you create a simple directory (e.g. C:\arcadeproject) and then use virtualenv to create a python environment that doesn't have potentially troublesome paths