Replace "from pyglet.media import avbin" to "from pyglet.media.sources import avbin" in psychopy/visual/window.py.
psychopy/visual/window.pyの from pyglet.media import avbin を from pyglet.media.sources import avbin に書き換えればとりあえず動きます。
My PsychoPy and the environment
- Windows 10 Fall Creators Update
- PsychoPy 1.85.6 Standalone
I downloaded StandalonePsychoPy-1.85.6-win32.exe from https://github.com/psychopy/psychopy/releases and installed it.
Error: "Avbin.dll fail to load"
I created a simple stimuli following this japanese tutorial.
The stimuli was shown, but after the stimuli window closed, an error was shown.
I did not use any image or video stimulus.
This problem has been discussed in official github issues, but will not be fixed. Windows fails to load avbin.dll · Issue #693 · psychopy/psychopy · GitHub
I compiled my .pysexp file to .py, and debug step by step.
I found that the error was occurred when pyglet.media.avbin module isimported in line 35 of /Lib/site-packages/psychopy/visual/window.py
from pyglet.media import avbin
I searched the module pyglet.media.avbin, and it was not found.
I found "pyglet.media.sources.avbin" instead.
I assume that "pyglet.media.avbin" is depend on old package structure. In Standalone PychoPy 1.85.6, Installed pyglet was version 1.3, and avbin.py is located in "pyglet/media/sources/", not in "pyglet/media/"
However, avbin.py is located in "pyglet/media/" in pyglet 1.1 and pyglet 1.2
I replace "from pyglet.media import avbin" to "from pyglet.media.sources import avbin" in psychopy/visual/window.py.
I do not know if this fix is appropriate or not, but it works well.
My first pull request for OSS was merged!!