LABSN / expyfun

Experimental paradigm functions.
BSD 3-Clause "New" or "Revised" License
13 stars 21 forks source link

Cannot run simple_video example on Windows #436

Closed drammock closed 2 years ago

drammock commented 2 years ago
> conda create -n test mne
> conda activate test
> pip install pyparallel rtmixer https://github.com/pyglet/pyglet/zipball/69735d0ba65728f7093437149750b52c1fd1cd95
> pip install git+https://github.com/labsn/expyfun
> python C:\path\to\expyfun\examples\stimuli\simple_video.py

[...SNIP]

Traceback (most recent call last):
  File "C:\Users\drmccloy\mambaforge\envs\test\lib\site-packages\pyglet\media\codecs\wave.py", line 58, in __init__
    self._wave = wave.open(file)
  File "C:\Users\drmccloy\mambaforge\envs\test\lib\wave.py", line 509, in open
    return Wave_read(f)
  File "C:\Users\drmccloy\mambaforge\envs\test\lib\wave.py", line 163, in __init__
    self.initfp(f)
  File "C:\Users\drmccloy\mambaforge\envs\test\lib\wave.py", line 130, in initfp
    raise Error('file does not start with RIFF id')
wave.Error: file does not start with RIFF id

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\drmccloy\Desktop\expyfun\examples\stimuli\simple_video.py", line 25, in <module>
    ec.load_video(movie_path)
  File "C:\Users\drmccloy\mambaforge\envs\test\lib\site-packages\expyfun\_experiment_controller.py", line 881, in load_video
    self.video = Video(self, file_name, pos, units)
  File "C:\Users\drmccloy\mambaforge\envs\test\lib\site-packages\expyfun\visual\_visual.py", line 1095, in __init__
    self._source = load(file_name)
  File "C:\Users\drmccloy\mambaforge\envs\test\lib\site-packages\pyglet\media\__init__.py", line 142, in load
    raise first_exception
  File "C:\Users\drmccloy\mambaforge\envs\test\lib\site-packages\pyglet\media\__init__.py", line 132, in load
    loaded_source = decoder.decode(file, filename, streaming)
  File "C:\Users\drmccloy\mambaforge\envs\test\lib\site-packages\pyglet\media\codecs\wave.py", line 105, in decode
    return WaveSource(filename, file)
  File "C:\Users\drmccloy\mambaforge\envs\test\lib\site-packages\pyglet\media\codecs\wave.py", line 60, in __init__
    raise WAVEDecodeException(e)
pyglet.media.codecs.wave.WAVEDecodeException: file does not start with RIFF id
Closing <rtmixer.Mixer object at 0x0000026F7FA6ABE0>
larsoner commented 2 years ago

You probably need pyglet-ffmpeg. Maybe we should have a pip install expyfun[video] if we don't have it already

drammock commented 2 years ago

hmm, just recreated the test env with pyglet-ffmpeg added to the pip install line, and I'm still getting the same error.