Applet for merging multiple .psyexp files

Hi!

I often use different combinations of the same paradigms in my research, but copy-pasting routines and rebuilding loops every time is a nuisance. So I wrote a little applet to facilitate merging experiments. It allows me to upload multiple .psyexp files and checks if there is any overlap in the component and routine names. If not, it lets me sort the experiments in the intended order and download the merged result. I thought it may also be useful for other people, so I uploaded it here: https://adjus.shinyapps.io/PsychoPyMerger/. Feel free to use it and give feedback.

Best,
Adrian

5 Likes

hello! i am not able two upload two files simultaneously on the link. please help

Hi, sorry for the late reply. It normally should work fine with multiple files. Make sure that all the files are in one directory so you can select them all at once without changing the directory.

Please could you add it to PsychoPy Online Demos to help people find it?

I did, thanks for making me aware of this thread!

Are you planning to release a Github-Repo of the Code? I would like to extend the Shiny-App a little bit.
Or maybe we can collaborate to extend it.

Would be great!

Hi Luke, I sent you a message to discuss this.

1 Like

Hi @ajus,
I tried to use your applet and everything went fine until I tried to open the outcome Psychopy merged project. Psychopy seems to try to open the project and then shut down for no apprearent reason :confused: I’m working with Psychopy 2022.2.5. Can this problem be linked with this version ?
Thanks in advance

PsychoPy Merger did identify replicated names between my two tasks. I updated them, then they merged.

However, trying to open them in 2024.2.3 after the merge I get:

Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/coder/coder.py”, line 2374, in fileOpen
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/_psychopyApp.py”, line 863, in newBuilderFrame
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/builder/builder.py”, line 197, in init
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/builder/builder.py”, line 764, in fileOpen
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/builder/builder.py”, line 1088, in updateAllViews
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/builder/builder.py”, line 4138, in draw
KeyError: ‘term’

During the merge it posted There are no duplicate component or routine names. You’re good to go!, so I was not surprised I could not find “term” in either experiment.

During the merge I did get the error message “The experiments have different settings.
The settings of the first experiment are used, this might cause problems.”, but no indication what setting or where. There are “Preferences” for PsychyPy and “Properties” for experiments. I’m guessing “Settings” means “Properties” probably?