UnboundLocalError: local variable ‘trialList’ referenced before assignment

OS (e.g. Win10): macOS13.2.1
PsychoPy version (e.g. 1.84.x): 2022.2.5
What are you trying to achieve?: upload a csv making it a condition for trials

What did you try to make it work?: I’ve reload PsychoPy version from 2023 to 2022, and my friends’ mac works with the 2022 version. Also, I checked my csv file to make sure it’s right for PsychoPy.

What specifically went wrong when you tried that?:
Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/builder/dialogs/init.py”, line 1531, in onBrowseTrialsFile
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/data/utils.py”, line 466, in importConditions
UnboundLocalError: local variable ‘trialList’ referenced before assignment

Check your conditions file for spaces in the column names

Thanks for your answering, I’ve checked it. Below is my file, hope you can find the error I get.
conditions_1.csv (139 Bytes)

I’ve also tried to use commas rather than semicolons, it causes the same error message.

Sorry for the delay. I’ve just checked our bug fixes and I think this is due to one of your columns being called corrAns, which accidentally got used by the developers for something else.

It should be fixed if your change your column to something else (e.g. corrAnswer) or you could try the 2024.1.0 release which is now available to download from Releases · psychopy/psychopy · GitHub

However, it may be something else, such as:

or maybe you have used word or congruent as an object name as well as a variable