AttributeError: 'str' object has no attribute 'setMovie'

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Win11
PsychoPy version : 2022.2.4
Standard Standalone? (y/n) : y
What are you trying to achieve?: I am using Psychopy to conduct an experiment where diverse shortclips will be presented and then the participant has to give a response about what he or she saw.
What did you try to make it work?:
I made everything following instructions on internet and youtube. The last week it worked for 3 repeats and then it was terminating.
What specifically went wrong when you tried that?: I tried to fix this issue and since then every experiment I make from scratch does not work. I get this error over and over again: 315.5707 INFO Loaded monitor calibration from [‘2022_11_26 17:22’]
pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
Traceback (most recent call last):
Hello from the pygame community. Contribute - pygame wiki
16.0268 WARNING t of last frame was 15.50ms (=1/64)
16.0543 WARNING t of last frame was 15.63ms (=1/63)
File “C:\Users\anast\Desktop\Experiment perception\h_lastrun.py”, line 234, in
question.setMovie(question)
AttributeError: ‘str’ object has no attribute ‘setMovie’
################# Experiment ended with exit code 1 [pid:5252] #################
334.2348 INFO Loaded monitor calibration from [‘2022_11_26 17:22’]

Is question the name of your movie component or the variable containing the movie file name?

I found the error it was the first letter of the name. I used accidently german keyboard on the first letter. I renamed everything using English keyboard. The experiment works now but I get another problem. After the first 6 trials it crashes with the error: Experiment ended with exit code 1 [pid:19092]
UPDATE I fixed this issue too. it has to do with the combination of video player and sound player and if stereo or not. Not all video players work with stereo and all sound players

1 Like