"Psychopy encountered an unhandled internal error!" issue

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\builder\builder.py”, line 1192, in runFile
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\runner\runner.py”, line 689, in runLocal
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 74, in generateScript
compileScript(infile=exp, version=None, outfile=filename)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 247, in compileScript
_makeTarget(thisExp, outfile, targetOutput)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 237, in _makeTarget
with io.open(eval(scripts), ‘w’, encoding=‘utf-8-sig’) as f:
PermissionError: [Errno 13] Permission denied: ‘C:\Users\NM\Documents\psychopy\MasterCopy_LexDec_lastrun.py’

Running: C:\Users\NM\Documents\psychopy\MasterCopy_LexDec_lastrun.py

202.7214 WARNING Monitor specification not found. Creating a temporary one…
pygame 1.9.6
Hello from the pygame community. Contribute - pygame wiki
3.1150 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).
27.9440 WARNING Monitor specification not found. Creating a temporary one…
27.9948 WARNING User requested fullscreen with size [1536 864], but screen is actually [1920, 1080]. Using actual size

Experiment ended.

this is what is stated in the runner ‘stdout’. I just have an issue with making the experiment run past the ‘practice trial’. Any help would be much appreciated
Thank you.

re: the Runner output
FYI, those are normal warnings about a mismatch between requested and actual screen size and shouldn’t affect the actual execution of the code!

re: describing your issue
I don’t think your description of your error is thorough enough for your readers to understand what’s going on without making a bunch of assumptions. You should include as much info as possible (that is relevant and organized) to orient the audience. Some examples of good additional info:

  • What task are you trying to implement?
  • What do you mean that it can’t run past the ‘practice trial’? Does it run previous components and then completely crash? In other words, give a thorough description of the circumstances under which the error occurred.
  • What have you tried so far to debug? What are some related forum posts on this Discourse website?
  • What version of Python/PsychoPy are you using, what operating system and version? Are you using Pavlovia?

throwaway opinion on your issue
It seems like a permission issue that could crop up when you try to write a file to somewhere on your computer that you don’t have access to, or maybe something finnicky popping up due to an administrator install of the program.

1 Like