Help with "unhandled internal error"

Hello Everyone,

While trying to set up an experiment, Psychopy encountered unhandled internal error, below is the message I got:

“Traceback (most recent call last):
File “/Applications/”, line 3238, in OnMouse
File “/Applications/”, line 3081, in insertRoutine
KeyError: ‘LDT’”

I would really appreciate your kind help in how to tackle this error please.

Hi @Aziz,

Could you please let us know:

  1. Which version of PsychoPy you’re running
  2. What you were doing specifically when the error occurred - i.e. inserting a new routine, pressing run etc.



Hello @Kimberley_Dundas,

Many thanks for your reply,

  1. I am using PsychoPy 2022.2.2. on my macOS Monterey.
  2. This error usually occurred after attempting to to insert a new routine.

Thanks again for your kind assistance

It looks like the routine you’re trying to add has either been deleted or was never properly created. Was the routine created via the flow panel Add Routine button or did you copy it over from another experiment? Could you share the experiment you’re having this problem on?

Hi @TParsons,

Many thanks for your helpful reply. It is greatly appreciated.

Now I get the same message mostly after I press “run the study online with (”. When I click ok, this is the message I get:

Traceback (most recent call last):
File “/Applications/”, line 721, in execute
File “subprocess.pyc”, line 858, in init
File “subprocess.pyc”, line 1704, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: ‘/Users/abdulazizaltamimi/Desktop/Psychopy/LDT’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/Applications/”, line 1380, in onPavloviaRun
File “/Applications/”, line 777, in syncProject
File “/Applications/”, line 94, in showCommitDialog
File “/Applications/”, line 1058, in getChanges
File “/Applications/”, line 674, in untracked_files
File “/Applications/”, line 678, in _get_untracked_files
File “/Applications/”, line 542, in
File “/Applications/”, line 1005, in _call_process
File “/Applications/”, line 735, in execute
git.exc.GitCommandNotFound: Cmd(‘/Applications/’) not found due to: FileNotFoundError(‘[Errno 2] No such file or directory: ‘/Users/abdulazizaltamimi/Desktop/Psychopy/LDT’’)
cmdline: /Applications/ status —porcelain —untracked-files

And this a synchronising window pops up and staying there until I close it.
LDT.psyexp (37.6 KB)
LEX_P.xlsx (8.8 KB)
LEX_target.xlsx (8.8 KB)

I would really appreciate your kind advice with this @TParsons ,

Many thanks in advance.