Can I pass a list from Pavlovia to Qualtrics via URL?

URL of experiment:

(here’s also my psyexp code in case the link doesn’t work)
sara_task_switch_beh_psychopy.psyexp (211.8 KB)

Description of the problem:

(I am new to all this so apologies if this sounds silly)

I am trying to pass a list of words from Pavlovia to Qualtrics…I was hoping I could create a list during my experiment and then pass it onto Qualtrics via URL

Does anyone have an idea of how / if I can do it?

In the task I add the words to ‘adj_list’ in a certain order based on certain conditions (which are different for each participant - that’s why I need to create it every time) and then I pass it to Qualtrics using:


but it doesn’t seem to work (participants do not see the list of words in the Qualtrics questionnaire)

In alternative I could create an excel, csv or txt file with the list, but is there someone with experience in chaining information between Pavlovia and Qualtrics who could advise me on how it would work (since I’d have a different file for each participant)?

Many thanks in advance! I really appreciate your help.

An update:
(URL of experiment: )

I now changed the completion URL on Pavlovia because I managed to spot some of my errors, this time using the following url:


but again I failed to transfer the adj_list to Qualtrics (this time Qualtrics set the adj_list as ‘undefined’).

All the other ID variables were correctly transferred to Qualtrics (except for the Prolific ID which was set to ‘undefined’ too for some reason)

Any help is truly appreciated!


I’m sorry but I think you’ll need to pass each item in the list as a separate URL variable.

I see, thank you very much!

May I only ask you if this would be the correct way to pass the information?
(I am only including prolific ID and the list of words in the following example)


where adj_list is first created at the beginning of the experiment like this: adj_list = [];
and then words appended throughout trials using: adj_list.push(word);

Apologies if these are silly questions but I am new to both js coding and Pavlovia. Thank you!

That looks right to me.

Hi @wakecarter,

thank you.
I tried passing the words as separate variables but I am getting an error when trying to sync my newly edited task to Pavlovia (I only changed the completion URL):
RecursionError: maximum recursion depth exceeded while calling a Python object (see screenshot below)

Might this be because the elements I take for the completion URL (adj_list[0], adj_list[1], etc…) do not exist since they are created later on in the experiment?
Or could it be that my URL is too long / is passing too many variables? I am trying to pass 100 words…

Apologies for bothering you again with this, many thanks for your help.

Here’s the psyexp file: sara_task_switch_beh_psychopy.psyexp (215.9 KB)

Sorry – my mistake. The completed URL can only contain expInfo variables. To add variables later you need to redirect using

Try with a short list of just a few words before going for the whole thing.

Great, thank you for the heads up.
So I could for example set my completion URL in the experiment settings tab just as:


and then add the following code in a code component in the “End Experiment” tab?

psychoJS.setRedirectUrls('$""+expInfo['PROLIFIC_PID']+"&adj_list0="+adj_list[0]+"&adj_list1="+adj_list[1]+"&adj_list2="+adj_list[2]', '$""+expInfo['PROLIFIC_PID']')

Do I remove the $ sign or do I write the urls exactly as I would write them in the experiment settings?

You don’t need the $ in the code component and I wouldn’t bother having it in the completed URL. You may as well start with a completed URL of just and add all the variables in the redirection.

Personally I’d put it in Begin Routine of the final routine just in case End Experiment is too late.

Thank you for the suggestions.
I’ve now set the starting URL as you suggested, then in Begin Routine of a code component towards the end of the experiment I’ve set the JS code to be something like:

psychoJS.setRedirectUrls(((((((('' + expInfo['PROLIFIC_PID']) + '&adj_list0=') + adj_list[0])+ '&adj_list1=') + adj_list[1])+ '&adj_list2=') + adj_list[2]), '');

this syncs correctly when I only pass few words like in this example above, but it gives me the following errors when I populate the function with all the 100 words I need:

  • RecursionError: maximum recursion depth exceeded
  • AttributeError: ‘RecursionError’ object has no attribute ‘message’

I checked the syntax (having such a long function becomes error-prone, but I checked and it should have the correct number of brackets etc…), but it seems like after a certain number of variables that error appears…any suggestion on what else I could try or how to fix it?

psyexp file attached: sara_task_switch_beh_psychopy.psyexp (225.1 KB)

Why do you need to pass 100 words to Qualtrics?

Another option would be to pass the list as a single delimited string and then split it in Qualtrics using JavaScript.