[solved] MovieStim and Psycho backend problem
I have to display a video file in an experiment builded in Psycho. Since the media_player_vlc plug-in does not work on Psycho, I'm trying to display the movie by the PsychoPy commands. However, something goes wrong. This simple code:
from psychopy import visual
mov = visual.MovieStim(exp.window, 'C:/Users/Andrea/Desktop/Movie.avi')
mov.draw()
exp.window.flip()
produces the following error:
In: inline_script (prepare phase)
File "dist\psychopy\visual.py", line 3816, in __init__
Python traceback:
AttributeError: 'NoneType' object has no attribute 'width'
and in the debug window:
File "dist\libopensesame\inline_script.py", line 111, in prepare
File "<string>", line 3, in <module>
File "dist\psychopy\visual.py", line 3816, in __init__
AttributeError: 'NoneType' object has no attribute 'width'
I use a PC with Windows 7 64 bit. From the PsychoPy group I read that avbin.dll generates some problems on 64 bit Windows machines, but as far as I know this problem should be solved now.
Any suggestion?
Thanks.
Andrea

Comments
Hi Andrea,
Your code is fine. It works for me with PsychoPy 1.76.00 on Kubuntu 12.04.
From the error, it seems as though there is simply a bug somewhere in PsychoPy, not something related to
avbin.dll(I think that would result in hard crashes, but I'm not a 100% sure). What version of PsychoPy do you use? In OpenSesame you can check this by typingmodules()in the debug window. If you are up-to-date and still get this error, it might be worthwhile posting it on the PsychoPy mailing list.Edit: It could also be that PsychoPy cannot find the file, or that it cannot handle the video format. It's quite often in PsychoPy that crashes are not dealt with gracefully and result in uninformative error messages.
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan. You were right, the problem was due to something in the video format. It sounds strange, because my initial video was an uncompressed AVI. I re-created a compressed video and now it works.
Btw, in order to make my initial code funcioning, it has to be added a loop, so:
Cheers,
Andrea