psychopy.org | 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.

Thanks.

Generating PsychoPy script...
Traceback (most recent call last):
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py", 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\psyexpCompile.py", line 188, in compileScript
    _makeTarget(thisExp, outfile, targetOutput)
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py", line 167, in _makeTarget
    script = thisExp.writeScript(outfile, target=targetOutput)
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\experiment\_experiment.py", line 210, in writeScript
    self_copy.flow.writeBody(script)
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\experiment\flow.py", line 243, in writeBody
    entry.writeInitCode(script)
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\experiment\routine.py", line 99, in writeInitCode
    thisCompon.writeInitCode(buff)
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\experiment\components\image\__init__.py", line 132, in writeInitCode
    depth = -self.getPosInRoutine()
  File "C:\Users\kc71\AppData\Local\PsychoPy3\lib\site-packages\psychopy\experiment\components\_base.py", 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\Fife_Puzzle_lastrun.py #######
C:\Users\kc71\AppData\Local\PsychoPy3\pythonw.exe: can't open file 'C:\Users\kc71\Desktop\Fife Puzzle\Fife_Puzzle_lastrun.py': [Errno 2] No such file or directory

I uninstalled and reinstalled 3.2.4. It works now…