Reinstalled 2025.1.1 version and my scripts screated in 2025.1.1 do not run anymore

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

OS (e.g. Win10): Win10
PsychoPy version (e.g. 2024.2.4 Py 3.8): 2025.1.1. Py 3.10
Standard Standalone Installation? (y/n) If not then what?: y
Do you want it to also run online? (y/n) n
What are you trying to achieve?: I uninstalled version 2025.1.1. and installed 2024.2.4 to have the same version on my laptop as the university lab has that I am visiting now. It did not even open so after a while, I uninstalled it and reinstalled 2025.1.1.

What specifically went wrong when you tried that?:
the script (created in 2025.1.1. on the same laptop) opens but when trying to run, it does not work. I receive the following error message:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\builder\builder.py”, line 1398, in runFile
self.app.runner.panel.runLocal(event)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\runner\runner.py”, line 641, in runLocal
generateScript(
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 78, in generateScript
raise LegacyScriptError(
psychopy.scripts.psyexpCompile.LegacyScriptError: Error: Script compile exited with code 1. Traceback:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\Program Files\PsychoPy\lib\runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 229, in
compileScript(args.infile, args.version, args.outfile)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 219, in compileScript
thisExp = getExperiment(infile, version)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 146, in getExperiment
from psychopy.app.builder import experiment
File "C:\Users\fogdd\AppData\Roaming\psychopy3\versions\psychopy\app\builder_init
.py", line 5, in
from .builder import BuilderFrame
File “C:\Users\fogdd\AppData\Roaming\psychopy3\versions\psychopy\app\builder\builder.py”, line 32, in
import psychopy.app.plugin_manager.dialog
File “C:\Users\fogdd\AppData\Roaming\psychopy3\versions\psychopy\app\plugin_manager_init.py”, line 4, in
from .packages import PackageManagerPanel
File “C:\Users\fogdd\AppData\Roaming\psychopy3\versions\psychopy\app\plugin_manager\packages.py”, line 7, in
from pypi_search import search as pypi
ModuleNotFoundError: No module named ‘pypi_search’

I have to check and edit things in my scrips so I need urgent help (turned out that a version of the script that used control runs smoothly on the lab PCs, so thaere was no need for this whole downgrading…)

I am having the same issue when I try to run older version on 2025.1.1

Ach, that’s so annoying, but I do know the issue. Pypi has removed this package and all its historical releases entirely :sob: and it’s something that PsychoPy depended on for versions 2023.x and 2024.x

BUT that functionality shouldn’t have been needed to compile/run a script :thinking:

OK, I might have a solution if you’re able to tweak the file in Program Files. Could you change

*File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 146, *
from psychopy.app.builder import experiment

to be
from psychopy import experiment

Does that get rid of the error?

Hi,

Unfortunately, I cannot save the changed version under the same name. So I cannot test it.

That’s a permissions issue - you’re editing something in program files. If you save as that name to somewhere else, like the desktop, make the change and then copy back to that spot program files (and agree to the admin privs when you do so) you’ll be able to test it out. Otherwise, no worries, we’ll be having a 25.2.1 release soon with the fix included

Will try this out today. I am not sure this is related to that issue but I tried uninstalling 2025.1.1 and going back to previous version 2024.2.3 and it no longer works (it will immediately open and close Psychopy). I am considering doing a system restore.

Before doing a system restore just rename PsychoPy’s appdata.cfg to appdata_backup.cfg and try again. My guess is that something about the app state in 2025 isn’t compatible with the older version

Get a whole bunch of new errors:

Traceback (most recent call last):
  File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\builder\builder.py", line 1398, in runFile
    self.app.runner.panel.runLocal(event)
  File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\runner\runner.py", line 641, in runLocal
    generateScript(
  File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py", line 78, in generateScript
    raise LegacyScriptError(
psychopy.scripts.psyexpCompile.LegacyScriptError: Error: Script compile exited with code 1. Traceback:
Alert 4051: Experiment was built in a future version of PsychoPy (2025.1.1), we recommend either updating PsychoPy or changing the "Use Version" setting in Experiment Settings to this version.
For more info see https://docs.psychopy.org/alerts/4051.htmlTraceback (most recent call last):
  File "C:\Program Files\PsychoPy\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\PsychoPy\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py", line 229, in <module>
    compileScript(args.infile, args.version, args.outfile)
  File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py", line 221, in compileScript
    _makeTarget(thisExp, outfile, targetOutput)
  File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py", line 201, in _makeTarget
    script = thisExp.writeScript(outfile, target=targetOutput)
  File "C:\Users\HN_LAB_405\AppData\Roaming\psychopy3\versions\psychopy\experiment\_experiment.py", line 323, in writeScript
    self_copy.settings.writeDevicesCode(script)
  File "C:\Users\HN_LAB_405\AppData\Roaming\psychopy3\versions\psychopy\experiment\components\settings\__init__.py", line 1436, in writeDevicesCode
    inits['eyetracker'].val = ioDeviceMap[inits['eyetracker'].val]
KeyError: 'eyetracker.hw.mouse.EyeTracker'


Right, so you’ve saved your old experiments in the new version and now they don’t really want to go back to the past.

I recommend you stick with 2025 and fix the loading of the older experiments, by the method above.

The issue is ioHub with eye-tracking/Tobii is borked right now.

So I cant really use 2025 with that issue (changing the complie script does not work and throws the errors above). I am going to try the appdata_backup.cfg trick you mentioned to downgrade to earlier PsychoPy version but it seems the installation of 2025.1.1 messed something up on this system and I am not sure what it is.

Just to give you a clearer picture of what is going on:

My lab recently updated to PsychoPy version 2025.1.1. After the update, I tested Tobii eye-tracking using iohub, but it no longer works. I then tried setting the version back to 2024.2.3, but ran into a PyPI error during installation.

Next, I uninstalled 2025.1.1 and attempted to reinstall 2024.2.3, but after doing so, PsychoPy would no longer open at all. I reinstalled 2025.1.1 and applied the suggested changes to the compile script, but now I’m getting a large number of errors when trying to use any version older than 2025.1.1.

Eeesh, OK, I suspect this is an issue with the plugins needing the right version them :sob:
I think that will need help from the team. We’ll get in touch over email to work out what’s going on