Fail to pass url parameters

Just found the same issue now. We’ve not got credits yet, but testing the pilot URL, i’ve tried to do the following:

https://run.pavlovia.org/fgasking/parametertest/html/?participant=1&group=2

But we still get the pop up screen prompting for input values.

Hello @young1 and @fgasking,

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!
Cheers,

Alain

That’s brilliant, thanks for the very quick fix Alain.

Confirmed as working here. Had to refresh the browser a few times, that was all.

Have a good evening!

Frank

Wow thank you for your quick help, Alain.

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?

1 Like

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”?

Yep same issue with csv file name too!

1 Like

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'

But expInfo[‘participant’] seems not available as is evident from the following error in the JavaScript console:
Object { origin: "TrialHandler.importConditions", context: "when importing condition: sessions/participant_.csv", error: {…} }

@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.

Hello @frank.papenmeier,

I shall attend to it in the afternoon. With any luck, I should have a fix for you before end of business today.

Alain

Thanks for the swift response! I keep my fingers crossed that you can identify and resolve the source of this issue without to much effort.

Hello again @frank.papenmeier, @young1. @hrb,

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.
Best wishes,

Alain

Hi @apitiot,

thanks for the quick fix. Works perfectly for me!

All the best,

Frank.

Hi!
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,
Johan

Do you have participant in your expInfo dialogue box?

Hi!

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.

Best,
Johan

Please could you post or PM me a sample URL containing the participant value. If it doesn’t work I’d expect to see the value request in the dialogue box

Hi! Thanks for your help! I think I managed to solve it.

1 Like

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

Hi,

Similar to the original post, one of my URL parameters is not automatically registered and the dialogbox prompts the user.

More specifically, it does not automatically register the first URL parameter. For example, if I have parameters ‘Session’ and ‘Participant’, ‘Participant’ is correctly registered and not prompted but ‘Session’ is.

If I have only one field for experiment info (e.g. ‘Participant’), and I input only one parameter in the URL (e.g., ‘/?Participant=123)’ it also does not get automatically registered.

I did find a workaround though! One option is to include an unused parameter at the beginning of the URL parameters (e.g. ‘/?unused_parameter=xxx&Participant=123’), or simply include the ampersand before the first parameter (e.g., ‘/?&Participant=123’).

My parameter values are stored correctly in the output file.

Hope this helps the development team and anyone who needs the workaround in the short run.

Cheers,
Pedro

What version of PsychoPy are you using?

Please could you check your capitalisations?