Aller au contenu
login
arrow_backRetour aux issues
OpenwaterHealth/openlifu-closed-loop-eeg #9

N-back trial-conditions file is hardcoded and gets silently reverted by the PsychoPy Builder export

ecoDébutant bug good first issue

descriptionDescription

`n-back-task-with-visual-stimuli/N-back_lastrun.py` loads its trial order from a hardcoded filename: ```python trialList=data.importConditions('trial_4.xlsx'), ``` `N-back_lastrun.py` is a PsychoPy Builder **"last run" export** -- it's regenerated from `N-back.psyexp` every time the task is launched from the Builder GUI, and the Builder's own saved `conditionsFile` setting is also `trial_4.xlsx`. **The bug:** editing `N-back_lastrun.py` by hand to point at a different `trial_N.xlsx` for a new participant/run only sticks until the next time someone opens and runs the task from Builder. That regenerates the file and silently reverts the trial file back to whatever `N-back.psyexp` has saved -- overwriting the manual per-run change with no warning. It's easy to run a session against the wrong trial-conditions file without noticing. **Expected behavior:** the trial-conditions file should be selected per-run (e.g. via `expInfo` / a run parameter passed at launch) rather than hardcoded in a generated file that gets clobbered by the Builder's own export step. **Suggested fix + test:** add an `expInfo` prompt (or CLI/env parameter) for the trial-conditions filename, and add a regression test asserting that a fresh Builder export still respects a per-run override rather than reverting to `trial_4.xlsx`.
codeOuvre sur GitHub