| Reference | Downloads | Github

Value error - missing Image Component?

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

OS : Win10
PsychoPy version (e.g. 1.84.x): 3.2.4
Standard Standalone? (y/n) If not then what?: Standalone desktop version

I have an experiment that was written in 3.1.5. I am now using 3.2.4, but the experiment won’t run. So, I rebuilt the experiment completely (copying and pasting code from the builder code sections in the 3.1.5 version, but rebuilding everything else from the builder buttons).

When I try to run it, I get the following. I have googled this error and can’t find it at all. I’m a bit baffled on where to start to fix this.

In addition, it is looking for a last run file, but I just created this experiment, from scratch, so I don’t understand why it is looking for a last run.

Any suggestions are greatly appreciated.


Generating PsychoPy script...
Traceback (most recent call last):
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\app\builder\", line 2437, in generateScript
    psyexpCompile.compileScript(infile=self.exp, version=None, outfile=experimentPath)
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\scripts\", line 188, in compileScript
    _makeTarget(thisExp, outfile, targetOutput)
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\scripts\", line 167, in _makeTarget
    script = thisExp.writeScript(outfile, target=targetOutput)
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\experiment\", line 210, in writeScript
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\experiment\", line 243, in writeBody
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\experiment\", line 99, in writeInitCode
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\experiment\components\image\", line 132, in writeInitCode
    depth = -self.getPosInRoutine()
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\experiment\components\", line 504, in getPosInRoutine
    return routine.index(self)
ValueError: <psychopy.experiment.components.image.ImageComponent object at 0x0000014EA2DEA358> is not in list
###### Running: C:\Users\kc71\Desktop\Fife Puzzle\ #######
C:\Users\kc71\AppData\Local\PsychoPy3\pythonw.exe: can't open file 'C:\Users\kc71\Desktop\Fife Puzzle\': [Errno 2] No such file or directory

I uninstalled and reinstalled 3.2.4. It works now…