Hi Psychopy Community,
Repost from earlier thread as some things have changed and I want to make sure this error and any solution is easy for others to find. I’m trying to create a MovieStim3 object, I’m getting an error that I’m not sure how to resolve, although now I’m not sure if I need to worry about it. Any help would be greatly appreciated!
Potentially useful information about my setup:
- Using psychopy standalone version 1.90.2, python 3
- Running on Windows 10 laptop
- Dual monitor setup, second monitor UHD
The Problem:
When I try to create a MovieStim3 object. I get a “Fatal Python error” message.
What has changed:
I’ve been trying different things to figure out what is going on, and in particular I tried to make a short run of two movies in Builder view. Surprisingly, it ran, but gave me the same error after the movies finished playing. What is going on here? Should I be worried about this “fatal error”?
I’m using moviepy as the backend in Builder (avbin did not play the movies at all and openCV did not properly sync sound and image and dropped many frames). The error seems to occur in a moviepy deconstructor.
Minimal (Non)Working Example:
import psychopy
psychopy.useVersion('latest')
from psychopy import monitors, visual, core
expMonitor = monitors.Monitor('subjectMonitor')
SCREEN_SIZE = (3840,2160)
window2use = visual.Window(
SCREEN_SIZE, fullscr=True, screen=1,
monitor=expMonitor, color=[0,0,0], colorSpace='rgb')
movieFullPath = r'C:\path\to\movies\testmovie.mp4'
thisMovie = visual.MovieStim3(win=window2use, name='testmovie',
noAudio = False, filename = movieFullPath)
window2use.close()
core.quit()
Errors and Warnings this code produces:
##### Running: C:\Users\Megan\Documents\socEvalTask\socialEvaluationTask\psychopyPilot\MWE.py #####
1.3457 WARNING User requested fullscreen with size [3840 2160], but screen is actually [2560, 1440]. Using actual size
3.5714 WARNING Couldn't measure a consistent frame rate.
- Is your graphics card set to sync to vertical blank?
- Are you running other processes on your computer?
3.8320 WARNING t of last frame was 26.46ms (=1/37)
3.8653 WARNING t of last frame was 27.20ms (=1/36)
3.8994 WARNING t of last frame was 27.77ms (=1/36)
3.9322 WARNING t of last frame was 25.60ms (=1/39)
3.9655 WARNING Multiple dropped frames have occurred - I'll stop bothering you about them!
5.4655 WARNING Couldn't measure a consistent frame rate.
- Is your graphics card set to sync to vertical blank?
- Are you running other processes on your computer?
5.4655 WARNING FrameRate could not be supplied by psychopy; defaulting to 60.0
5.7489 INFO Loaded SoundDevice with PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4
5.7490 INFO sound is using audioLib: sounddevice
7.1327 EXP Created testmovie = MovieStim3(__class__=<class 'psychopy.visual.movie3.MovieStim3'>, autoLog=True, color=UNKNOWN, colorSpace=UNKNOWN, depth=0.0, filename=str(...), flipHoriz=False, flipVert=False, fps=UNKNOWN, interpolate=True, loop=False, name='testmovie', noAudio=False, opacity=1.0, ori=0.0, pos=array([0., 0.]), size=array([1600., 1000.]), units='pix', vframe_callback=UNKNOWN, volume=UNKNOWN, win=Window(...))
7.1900 EXP window1: mouseVisible = True
Fatal Python error: PyImport_GetModuleDict: no module dictionary!
Current thread 0x00001e6c (most recent call first):
File "C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 116 in __del__