I think I have encountered a bug with the interaction between URL parameters and datafile saving in 2022.1.1 and 2022.1.3 of PsychoPy/JS (Github Issue with same information).
OS: Windows 10
Coder or Builder?: Builder
PsychoPy or PsychoJS?: PsychoJS
Offline or Online: Both
PsychoPy version: 2022.1.x
What are you trying to achieve?
I use URL parameters to transfer information from my participant recruitment site (e.g. Prolific) to my Pavlovia-hosted experiment. One of the URL parameters is the participant number, which I use to name the file with the format participant_expName_Time.csv
.
Experiment Set-up
- Experiment Settings > Data > Data Filename says
u'data/%s_%s_%s' % (expInfo['participant'], expName, expInfo['date'])
- provide link with URL parameter
(e.g.,https://run.pavlovia.org/USER/EXPERIMENT/?participant=1
)
Previous Behaviour - tested on version 2021.2.3
- participant does not have to input a participant number
- upon experiment completion or interruption:
- datafile is saved at
data/1_expName_TIMESTAMP.csv
- datafile contains column
participant
and each cell includes the URL parameter provided participant number1
- datafile is saved at
Current Behaviour - tested on versions 2022.1.1 and 2022.1.3
- participant does not have to input a participant number
- upon experiment completion or interruption:
- datafile is saved at
data/_expName_TIMESTAMP.csv
note how the participant number is missing from the data filename - datafile contains column
participant
and each cell includes the URL parameter provided participant number1
- datafile is saved at
What did you already try?
- This behaviour can be reproduced offline using the Run Local JS option if you append
/?participant=1
to the LocalHost URL - If the participant number is filled manually during the dialog box (offline or online) the filename is correctly saved as 1_expName_Time.csv
- I have replicated this behaviour on two computers running version 2022.1.1 and one computer running versions 2021.2.3 and 2022.1.3.
As it currently stands, this behaviour may be problematic for researchers who wish to automate parts of the data collection/analysis if participant numbers are expected in the file name. Additionally, there may be a risk of data loss depending on how a system handles identical filenames.
Are other users experiencing this behaviour?