psychopy.org | Reference | Downloads | Github

Error When Trying to Run Experiment

I have completed building my task and when I go to run it a separate box appears with errors preventing my task from running. Below is a copy of the error message that appears. I have been able to run this task on my previous computer, but I got a new one and now it wont run.

Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\gui\qtgui.py”, line 15, in
from PyQt4 import QtGui
ModuleNotFoundError: No module named ‘PyQt4’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\Hope Gill\Dropbox\Research Design 2018-2019\VWM Task\Working Memory Capacity Task Session 3_lastrun.py”, line 14, in
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging, clock
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\gui_init_.py”, line 33, in
from .qtgui import *
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\gui\qtgui.py”, line 19, in
from PyQt5 import QtWidgets
ImportError: DLL load failed: The specified procedure could not be found.

Hi @hgill16, this has been fixed and will be in the next release of PsychoPy:

Hello,

Thank you for getting back to me so quickly. When will the latest version come out?

Hope

Hey! I’m having the same problem I installed the lastest version of PyschoPy 3.0.5.

Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\gui\qtgui.py”, line 15, in
from PyQt4 import QtGui
ModuleNotFoundError: No module named ‘PyQt4’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “D:\Talia\untitled.py”, line 14, in
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging, clock
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\gui_init_.py”, line 33, in
from .qtgui import *
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\gui\qtgui.py”, line 19, in
from PyQt5 import QtWidgets
ImportError: DLL load failed: The specified procedure could not be found.

1 Like

Thanks @TaliaRoman, there will be a new release very soon with the fix included (see link above).
Apologies for the inconvenience :slight_smile:

@jon when can we expect the new release ?

I’m currently testing it on a clean virtual machine to make sure it’s all working. Might be able to release today!

It’s now live at the usual place:

1 Like

Hi there,

I’m still having this issue:

Welcome to PsychoPy3!
v2021.1.4
27.3435     INFO     Loaded monitor calibration from ['2021_01_04 15:09']
Generating PsychoPy script...

## Running: C:\Users\r02mj20\Desktop\DotStim\GaussTest_interleavedQUEST_coherence.high_lastrun.py ##
29.8790     INFO     Loaded monitor calibration from ['2021_01_04 15:09']
0.7270     WARNING     We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use ['sounddevice', 'PTB', 'pyo', 'pygame'] (in that order).
Traceback (most recent call last):
  File "C:\Users\r02mj20\Desktop\DotStim\GaussTest_interleavedQUEST_coherence.high_lastrun.py", line 18, in <module>
    from psychopy import sound, gui, visual, core, data, event, logging, clock, colors
  File "C:\Users\r02mj20\PsychoPy3\lib\site-packages\psychopy\gui\__init__.py", line 45, in <module>
    from .qtgui import *
  File "C:\Users\r02mj20\PsychoPy3\lib\site-packages\psychopy\gui\qtgui.py", line 35, in <module>
    from PyQt5 import QtWidgets
ImportError: DLL load failed: The specified procedure could not be found.
##### Experiment ended. #####

Any thoughts?

That looks like your installation is broken. Either not all the files are there or they’ve moved, would be my guess

Ahh, ok , I’ve no idea how that has happened.

I’ve tried uninstalling and re-installing PsychoPy, but I’m still getting the same error message when I try to run anything. Any suggestions?

For anyone wondering about the above issue, it turned out to be a problem caused by the university security system. Our university service desk tweaked the CyberArk policy to allow PsychoPy to install in Program Files; users need write access to the PsychoPy program folder in order for it to run properly. Once those permissions were set, and I’d logged out and back in, the program functioned as expected. Hope this is helpful for anyone in a similar situation.