Existing .psyexp file does not open properly after installing v2021.2.3

I installed PsychoPy on this Mac for the first time ~6 months ago. I have been working on a .psyexp file with no problems. However, I wanted to use the new Microphone feature, so I installed the current version today. Now, when I open the .psyexp file, only two (of ~20) routines display. (However, if I open the .psyexp file in TextEdit, I can clearly see that all my routines are still there…they just aren’t being properly loaded by PsychoPy v2021.2.3.)

Here is the error code from the Runner (anonymized names for simplicity):

Failed to load /Users/name/Desktop/folder/filename.psyexp. Please send the following to the PsychoPy user list
Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 695, in fileOpen
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/_experiment.py”, line 635, in loadFromXML
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/_experiment.py”, line 459, in _getXMLparam
KeyError: ‘channel’
Failed to load /Users/name/Desktop/folder/filename.psyexp. Please send the following to the PsychoPy user list
Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/runner/runner.py”, line 970, in loadExperiment
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/_experiment.py”, line 635, in loadFromXML
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/experiment/_experiment.py”, line 459, in _getXMLparam
KeyError: ‘channel’

OS: MacOS Big Sur 11.3
PsychoPy version: 2021.2.3
Standard Standalone?: yes
What are you trying to achieve?: Open a .psyexp file that I was working on in a previous version of the app

What did you try to make it work?: Restarted program. Uninstalled and reinstalled. Restarted machine.

What specifically went wrong when you tried that?: None of those efforts impacted what the Builder is displaying, which still only 2 of ~20 routines in the actual file.

Update:
After test installing older versions of PsychoPy, I can confirm that the error was introduced with version v2021.2.0. My .psyexp file continues to open properly (all routines visible in the Builder) in a re-installed version of v2021.1.4, but it does not open properly in any version thereafter.

I really need the Microphone component, so I would love to know what exactly is causing the problem in the newer versions… :sob:

You might be able to get the file open if you can edit the psyexp file in a text editor to remove the channel reference.

However, feel free to upload your psyexp file here or PM it to me and I’ll try to open it.

Thanks for the idea, wakecarter!

Unfortunately, I don’t find “channel” anywhere in the file (opened in TextEdit)…but I probably should have specified earlier that I did not yet have a Mic component in the experiment! I knew I wanted to use the newer component so I was waiting until I upgraded my PsychoPy version to add the component at all.

However, I installed v2021.2.3 on a different, newer Mac (still running Big Sur, though) and, miracle of miracles, it opens totally fine. Well, maybe not totally, as it takes twice as long to load the first screen on the fancy new machine compared to my delightfully old and trust one… But all the routines are there! So my original problem must have something to do with the hardware on my older Mac not playing nice with v2021.2.0 and beyond. :woman_shrugging:

I really appreciate your quick suggestion and offer to help! :grinning_face_with_smiling_eyes: