URL of experiment: behaviouralCQ [PsychoPy]
Description of the problem: Pavlovia doesn’t redirect to the URL at the end of the experiment, it just stays on the grey screen. It’s a finger press task, where participants have to learn 2 sequences. I have a code component that tells the experiment which link it should redirect to depending on the day (it’s a 3-day experiment), which looks like this:
if p n is odd, use seqSet 1 if even, use 2
seqSet = ‘’
if int(expInfo[‘participant’]) == 0:
expInfo[‘seqSet’] = ‘s0Practice’
elif int(expInfo[‘participant’]) % 2 == 0:
expInfo[‘seqSet’] = ‘s02’
else:
expInfo[‘seqSet’] = ‘s01’
completedURL = ‘’
if int(expInfo[‘participant’]) == 0:
completedURL = ‘’
elif (expInfo[‘day’]) == ‘day1’:
completedURL = ‘https://bhampsychology.eu.qualtrics.com/jfe/form/SV_bf2uvsFxoPdexBY?id='+expInfo['participant’]
elif (expInfo[‘day’]) == ‘day2’:
completedURL = ‘https://bhampsychology.eu.qualtrics.com/jfe/form/SV_55sL7k2Md4fgFGS?id='+expInfo['participant’]
elif (expInfo[‘day’]) == ‘day3’:
completedURL = ‘https://bhampsychology.eu.qualtrics.com/jfe/form/SV_cTpjTdx8o2OEyp0?id='+expInfo['participant’]
In the JS code part I have this:
seqSet = “”;
if ((Number.parseInt(expInfo[“participant”]) === 0)) {
expInfo[“seqSet”] = “s0Practice”;
} else {
if (((Number.parseInt(expInfo[“participant”]) % 2) === 0)) {
expInfo[“seqSet”] = “s02”;
} else {
expInfo[“seqSet”] = “s01”;
}
}
completedURL = “”;
if ((Number.parseInt(expInfo[“participant”]) === 0)) {
completedURL = “”;
} else {
if ((expInfo[“day”] === “day1”)) {
completedURL = (“https://bhampsychology.eu.qualtrics.com/jfe/form/SV_bf2uvsFxoPdexBY?id=” + expInfo[“participant”]);
} else {
if ((expInfo[“day”] === “day2”)) {
completedURL = (“https://bhampsychology.eu.qualtrics.com/jfe/form/SV_55sL7k2Md4fgFGS?id=” + expInfo[“participant”]);
} else {
if ((expInfo[“day”] === “day3”)) {
completedURL = (“https://bhampsychology.eu.qualtrics.com/jfe/form/SV_cTpjTdx8o2OEyp0?id=” + expInfo[“participant”]);
}
}
}
}
psychoJS.setRedirectUrls(completedURL)
In the completed URL section I have this:
My colleague has a very similar experiment and I used the same code etc for the redirect except that his works perfectly and mine doesn’t. I have tried deleting the experiment off pavlovia and creating a new one. I have made my experiment inactive on pavlovia and then synced it and I have changed the version of psychopy but that didn’t worked.
If anyone has any suggestions or can see something I have done that could be the problem I’d greatly appreciate it, thank you!