I’ve built my online experiment through Psychopy v.2020.1.2, and found it running smoothly online through Pavlovia.
A problem arises when I’m trying to pass participants’ ID through URL parameters. I input URL parameters with correct keys of expInfo dictionary in the experiment file, but info dialog still keeps popping up asking participants to insert variables themselves at the start and the saved data also does not come with passed url parameter values.
I checked psychojs source code for dialogbox(https://github.com/psychopy/psychojs/blob/master/js/core/GUI.js), and they seem to get url parameters first and only create text entry if the key is not in the url, but not understand why this does not work from my end. I tried tweaking the code with util.getUrlParameters() but didn’t work well.
Anyone who has the same issue or has solved this kind of issue before? Any kind of tips will be greatly appreciated. Thanks!
Thank you for bringing the matter to my attention. I made a quick change to handle the legacy Edge browser, which regrettably introduced that particular regression.
This is fixed. With my apologies for the mishap!
I noticed that with certain browsing data (e.g., cached image and data) this error still persists somehow, but after deleting all cached data it begins to work like a charm.
Another bug I noticed related to this though is when you output the csv file, url parameters does not go into the corresponding column, but creating new column under that url parameter
e.g., my participant id is ‘5e79737a18ee0e52ff4a27c3’, and expected csv output will be having this id under the ‘participant’ column, but as you can see the attached screenshot, we have n/a for ‘participant’ column. I know we have a new column called ‘5e79737a18ee0e52ff4a27c3’ at the end and we can use this information to check the correct participant ID, but I was wondering if there’s any way to fix this bug easily?
I am experiencing the same issue with the url parameters not going into the corresponding column. I am also having trouble saving the participant ID in the csv file name. Does your .csv file name contain the participant ID as or does it say “PARTICIPANT_studyname_etc.csv”?
For me, refreshing the browser also solved that it does not ask for the participant code anymore.
However, probably related to the above mentioned issues with the csv files, I cannot access the content of the participant field within the experiment anymore. Usually, I dynamically load the session file based on the participant code by entering the following in the Conditions field of the loop: $'sessions/participant_'+expInfo['participant']+'.csv'
@apitiot Are you working on a fix for this already? This is a severe bug as it prevents us from using Pavlovia with external recruitment systems such as Prolific and MTurk at the moment as we use individual session files for participants and thus require the “participant” parameter passed through the URL to be available from within the experiment with expInfo[‘participant’] as described in my post above.
I believe I have just fixed the issue, which had the same origin. That is to say, a quick change to accommodate legacy Edge browsers resulted in an inversion of key and value.
Would you like to give it a go and let me know if all is well on your end? Don’t forget to clear your cache so the new library replaces the old one.
I have the same problem as described above. Participant ID is left blank in the csv-file when it’s specified as an URL parameter. The file gets the syntax “PARTICIPANT_studyname_etc.csv”. Is there a fix for this bug?
All the best,
Yes. And everything works fine when I run the experiment without passing an participant as an URL parameter. That is, a textbox shows up where I can enter a participant name which then shows up in the csv files in a column called “participant”, and in the file name. It’s just that it doesn’t work when I pass particpant as an URL parameter (no textbox, and the participant info in the files is empty).
I am running the latest version of PsychoPy.
Hi Johan, I am having a similar issue and wondering whether you would share how you fixed this? If helpful, I’ve started a new topic for my issue along with more details here: Participant ID not saving in data file name