psychopy.org | Reference | Downloads | Github

Can't get VLCMovieStim working on Windows 10: "AttributeError: module 'vlc' has no attribute 'CallbackDecorators'"

This is driving me up the wall. I can’t get the VLCMovieStim stim type working in any form on my Windows 10 computer, even though it works perfectly fine on my mac.

I have installed the latest version of VLC, and ensured it is the 64-bit version to match my PsychoPy install. I’m on PsychoPy standalone 2021.2.3, though I’ve also gotten this behavior with a separate python environment where I manually installed psychopy. I have ensured that PYTHON_VLC_LIB_PATH has been added to my environment variables and points to the VLC folder with libvlc.dll (C:\Program Files\VideoLAN\VLC), and that the same path is also included in my system Path variable. That covers every fix I’ve been able to find and it’s still not working.

Is there any way to make vlcmoviestim work better “out of the box”? Is there something I’m missing? Any insight as to how to get this working would be appreciated at this point.

1 Like

On your “C:\Program Files\PsychoPy\Lib\site-packages” rename the “vlc” folder to “vlc_something”. It will work after this. The error was due to psychopy searching for CallbackDecorators inside the folder (as a .py file) instead of inside of vlc.py itself.

Well that got me a different failure at least! “Cannot load lib specified by PYTHON_VLC_LIB_PATH env. variable”. I can work with that. I’ll keep at it and report back if I get it fully working.

I got it working completely. However, the video stops abruptly and out of nowhere after 2s of playing time and the experiment closes with no error message. I’m currently stuck trying to figure out why this is.

I got it working perfectly after that but I was using a custom video file. Thanks for the tip, I would never have figured that out!

1 Like

Thanks for that info @Falexs
That vlc folder should not be there at all - looks like some aged former version (or completely different package aiming to achieve the same goal as python-vlc and resulting in a name clash that I hadn’t spotted). I’ll make sure that’s gone from the next release

1 Like