psychopy.org | Reference | Downloads | Github

Error with completed URL when daisychaining experiments

URL of experiment: CRT_V6 [PsychoPy] and EAB_V8 [PsychoPy]

Description of the problem: I am trying to link several Pavlovia experiments together. I have successfully done this for the first experiments, where experiment 1 successfully redirects to experiment 2 (crt_v6), but this 2nd experiment refuses to successfully redirect to experiment 3 (eabv8). The “completed url” is correct in experiment settings in Psychopy, and it displays correctly in the javascript file when uploaded to Pavlovia, but when actually running the CRT_V6 experiment, at the end it tries to go to [url]/eab/v8 rather than [url]/eabv8 i.e., it seems to be inserting another forward slash where there shouldn’t be one (sorry I’m a new user so I can’t put more than 2 links in a post). The error page I get is “404 Not Found”. In the experiment settings on PsychoPy I also tell it to grab the participant number from the previous experiment by adding ?participant="expInfo[‘participant’] to the end of the url in the completed url box (as per wake carter’s crib sheet), which also worked fine for experiment 1 → experiment 2. I am using Psychopy version 2021.2.3

Thanks!

Please could you show your completed URL code?

Hi, thanks for replying so quickly! The completed url code is
$"https://run.pavlovia.org/ipuzzo/eabv8?participant="+expInfo['participant']

I’ve been re-doing it and I ended up deactivating CRT_V6, copying the files to a new folder, deleting the hidden git folder, renaming it CRT_V9 and again adding the above completed URL code. This new version now works and successfully redirects to EABV8 with the participant ID carried over from the CRT task, but now I am having an issue where my Experiment 1 (called DPT_V11) uses the same completed URL code to redirect to the CRT_V9 ($“CRT_V9 [PsychoPy]”+expInfo[‘participant’]) and it does take me to the correct experiment but the participant code doesn’t carry over now, and I can see it says participant=undefined at the end of the url once it has redirected at the end of the experiment. Are you able to see where I might have gone wrong?


Sorry – did you just delete your post while I was editing it to enclose the URL in preformatted text so I could check it, or did I accidentally remove your post?

Oh dear, I got a notification saying someone called Jon Akismet has temporarily hidden my post… I’ll try again!

$"https://run.pavlovia.org/ipuzzo/eabv8?participant="expInfo[‘participant’]

That’s the completed URL code I was using. Sorry for not preformatting it before, I’m a forum noob and when I tried to click preformat in the previous post it did something weird. So, I recreated the CRT experiment (CRT_V9) and deleted the hidden git folder, synced it as a new experiment, and it now successfully redirects to the next (eabv8) experiment with the correct participant code, but now I am having the issue where the first experiment does not correctly carry over the participant code to the second (CRT_V9) experiment. The completed url code I am using is the same i.e.:

$"https://run.pavlovia.org/ipuzzo/crt_v9?participant="expInfo[‘participant’]

Is there a reason why it suddenly won’t work? It successfully redirects but I can see that it says “participant=undefined” at the end of the URL once it has opened the CRT_V9 experiment.

Check your quotes around participant. they should be 'dumb' not ‘smart’.

Hi, I think that’s just the keyboard I’m using to reply with here - on Psychopy itself and in the js on github they definitely look like dumb quotes. It also works fine when going from the CRT to the EAB task, so it must be correct there at least. I will double-check this today though, thank you!

Sorry – you’re also missing the plus

$"https://run.pavlovia.org/ipuzzo/crt_v9?participant="+expInfo['participant']

and this will only work if you have participant as an expInfo variable.

Oh yes - that’s actually me not typing it out properly on here, sorry! On Psychopy itself I do have the plus in there - here is a screenshot I took yesterday

And do both experiments have participant in their expInfo dialogue box?

Aha… Yes they do, but I have just checked and Experiment 1’s dialogue box calls it Participant while experiment 2 calls it participant… I’m guessing it must be case-sensitive?

Yes, it is. You can always use Participant="+expInfo[‘participant’] to convert but I would recommend lower case.

Thank you so much. Everything is working fine now, which is amazing given I’m daisy chaining 3 different experiments with Qualtrics at each end!