404 error using Wakecarter's tool to assign consecutive participant id's

I’m trying to set up my Pavlovia study in Prolific and have implemented counterbalancing based on Wakecarter’s page which assigns consecutive participant numbers and then redirects to alternating URLS.

However when I try to visit the page ‘https://moryscarter.com/vespr/pavlovia.php?folder=EOResearch&experiment=bfi_filler_exp_final’, with or without a slash at the end, I get a 404 not found error. Interesting the url shows participant= 6, but I cannot access the page.

I have also tried with the prolific URL Parameters at the end, e.g ‘&id={{%PROLIFIC_PID%}}’ but that doesn’t change anything.

Any insight would be greatly appreciated!

Hi,

What is the URL for your experiment?

https://run.pavlovia.org/EOResearch/bfi_filler_exp_final/
and
https://run.pavlovia.org/EOResearch/bfi_filler_exp_final/html/

both give 404 errors

which is why my tool is failing to launch them.

Hi, so sorry, I finally realised it’s an issue of an errant capitalisation of the R in research ‘https://moryscarter.com/vespr/pavlovia.php?folder=EOresearch&experiment=bfi_filler_exp_final/’ works just fine now. Thanks so much!

Hi @wakecarter,
Thanks so much for this wonderful resource! We’re also trying to use your tool and we’ve run into a similar error:
The original research URL is part1V2_final [PsychoPy], which works fine,
but when we try running https://moryscarter.com/vespr/pavlovia.php?folder=eldarlabccl&experiment=combined_part1v2&id=c&researcher=d, we get a “404 page not found error”. Do you know what did we do wrong?

When the tool was written, Pavlovia experiments ran from an html sub folder. To signal that you are running from the experiment folder itself (the default since 2021.2) you need to add a / to the end of the experiment folder name.

(post deleted by author)

Hi @wakecarter thanks so much for this tool.

We are attempting to use your code to set consecutive ids for session

https://moryscarter.com/vespr/pavlovia.php?folder=eldarlabccl&experiment=combined_part1v2/&id=c&researcher=d&participant={{%PROLIFIC_PID%}}&PROLIFIC_PID={{%STUDY_ID%}}&group={{%SESSION_ID%}}

which in theory works and takes us to the right link etc… however, when we look at the data session is still 1 or 2.

more generally, we are trying to assign consecutive participant numbers as well as their prolific ID (since its a multisession study) - so if there is a better way to do that please let us know.

Thanks so much

You seem to be including id and researcher without any content (apart from the example letters) and then you are sending {{%STUDY_ID%}} as PROLIFIC_PID which won’t get passed through. Try

https://moryscarter.com/vespr/pavlovia.php?folder=eldarlabccl&experiment=combined_part1v2/&participant={{%PROLIFIC_PID%}}&id={{%STUDY_ID%}}&group={{%SESSION_ID%}}

Even though it seems to work in testing (the link shows ascending sessions)- our data file keeps returning session=1 for all participants. Any idea what could be going wrong?

Hi,

In integrating a jsPsych task on Pavlovia with Prolific, I was previously running into the same 404 error, but I resolved it by using the following study URL: https://moryscarter.com/vespr/pavlovia.php?folder=a&experiment=b/&PROLIFIC_PID={{%PROLIFIC_PID%}}&STUDY_ID={{%STUDY_ID%}}&SESSION_ID={{%SESSION_ID%}}

However, while the consecutive participant counter is working (thanks again for the amazing app!), it seems that the Prolific information (PROLIFIC_PID, STUDY_ID, and SESSION_ID) is no longer appearing in the study URL and subsequently not being captured by my jsPsych code.

When I use the standard Pavlovia study URL: https://run.pavlovia.org/username/experiment/index.html?, I see that the Prolific information appears in the study URL and is indeed captured by the jsPsych code.

I imagine I am doing something wrong with the URL that I am entering onto Prolific, but I can’t seem to figure out what it is. Any insights or feedback on this would be greatly appreciated. Thanks so much!

Inputs id , group , session and researcher are optional but can be used to transfer a non-consecutive participant id and a variable that could be used as a password to access the experiment (to ensure that the participant information sheet has been viewed).

Try

https://moryscarter.com/vespr/pavlovia.php?folder=a&experiment=b/&id={{%PROLIFIC_PID%}}&researcher={{%STUDY_ID%}}&session={{%SESSION_ID%}}
1 Like

Please can you show an example URL created by your link?

This worked perfectly – thank you so much!

a different study but with the same issue- looks great in the url (session number is added) but in the data file its always stored as as session 1

this is our input
https://moryscarter.com/vespr/pavlovia.php?folder=eldarlabccl&experiment=v4_reward_only/&participant={{%PROLIFIC_PID%}}&PROLIFIC_PID={{%STUDY_ID%}}&group={{%SESSION_ID%}}

Thanks so much

When I go to the URL for the study, participant and session were prefilled with 1 and 34 which means that the value for group probably isn’t being saved at all.

Are there two columns called session in the data file?

I noticed this code in your JS

part_id=expInfo['session'];
    //part_id=randint(1,99);
    if ((part_id === 34)) {
        part_id=randint(1,99);
        
        }   

For this to work you need to put part_id=int(expInfo['session']) [Python code]

However, you could change this to:

if len(expInfo['session']):
     part_id=expInfo['session']
else:
     part_id=randint(1,99)        

then you could leave session blank in the expInfo dialogue box.

However, I just want to check that you have the same participant (PROLIFIC_PID) returning to the study for multiple sessions. I think that must be the case. However, if adding &session=2 in the URL doesn’t change the session that’s saved into the data file, then this seems to be an issue with your experiment, not my tool.

Try print('session',expInfo['session']) in Begin Experiment to see if the session is being registered in the console without having to check the data file.

Hi Wake, thanks again for all your help,

  1. i had the experiment display (or print out the session) the session number and it always works. It even works Previewing from the Prolific experiment. Then when I actually run it- every participant ends up having been assigned the same session.
  2. only a single column “session” is saved in the data file
  3. Yes we do have multiple sessions
    at this point we dont care if the counter is in the session or participant heading we are just hoping to have a way of having distinct numbers for each participant- but to also know which data file belongs to which prolific pid

I think you are misunderstanding how the tool is intended to work.

The original version counts the number of times the link has been clicked and assigns that value to “participant”.

If a value is already assigned to “participant” it instead counts the number of times that participant has clicked the link and assigns that value to “session”.

If you assign the Prolific ID to participant then every participant will get session 1 for their first session. If this is not what you want then you need to assign Prolific ID to something else so participant can increment normally

Hi Wake,

Okay yes we were misunderstanding your tool and thinking that it will just automatically transfer the count to session.

do you have a suggestion for the best way to assign a value to participant (based on the number of times the link has been clicked) but also store their prolific pids?

thanks again for all of your help/work

Use one of the available passthrough variables to store the Prolific id, such as id.

Don’t forget to add the variables you are using to the expInfo dialogue box.

If you want more flexibility, please try my VESPR Study Portal.

how would the full link look like (incrementing by participant id but keeping prolific PID)-

https://moryscarter.com/vespr/pavlovia.php?folder=eldarlabccl&experiment=v4_reward_only/&participant={{%PROLIFIC_PID%}}&id={{%PROLIFIC_PID%}}

seems not to work- can you point me to what i keep doing wrong
(trying to assign id to PROLIFIC PID and have participant increment by 1