Hi everyone,
I just upgraded my installation from 2023.1.2 to 2023.2.1.
In 2023.1.2 everything you put into the “before experiment” tab of a code component was executed BEFORE most of the auto generated python code (pretty much right after the imports). Now it gets executed AFTER the auto generated global variable setup:
# --- Setup global variables (available in all functions) ---
# Ensure that relative paths start from the same directory as this script
_thisDir = os.path.dirname(os.path.abspath(__file__))
# Store info about the experiment session
psychopyVersion = '2023.2.1'
expName = 'test' # from the Builder filename that created this script
expInfo = {
'participant': f"{randint(0, 999999):06.0f}",
'session': '001',
'date': data.getDateStr(), # add a simple timestamp
'expName': expName,
'psychopyVersion': psychopyVersion,
}
# Run 'Before Experiment' code from c_start
# ...
Was this change intentionally? Sadly it breaks all of my experiments as I controlled the contents of some of the fields of the experiment info dialogue with the “before experiment” code.
Maybe @TParsons? It’s not that bad, I’ll tell psychopy to use the old version. But I am interessted if that’s a bug or intentional