Error when downloading results #pavolvia

Description of the problem:
Hi, I’m getting the following error when I want to download my results from the pavlovia database (see below). The experiment is in running mode and uses jspsych as platform. What is the issue?

{“origin”:“http://pavlovia.org/api/v2/experiments/Voigt/aversion_visual_task/results",“context”:"when getting the results of an experiment”,“pathWithNamespace”:“Voigt/aversion_visual_task”,“experiment”:{“gitlabId”:143704,“avatarUrl”:"",“creationDate”:“2021-06-15 05:48:42.220”,“creatorId”:17259,“description”:"",“gitlabUrl”:“Sign in · GitLab 00:48:09”,“userIds”:[17259],“version”:“6.0.0”,“visibility”:“private”,“nbSessions”:7},“isOwnedByUser”:true,“error”:“error when preparing the result archive, exitStatus: 3072”,“errorCode”:null,“httpStatusCode”:500}

If the error persists, contact Pavlovia’s administrator.

I’m struggling to find an unsupported character on line 1, column 12 of data

“rt”,“responses”,“trial_type”,“trial_index”,“time_elapsed”,“internal_node_id”,“subject”,“Trial_Name”,“view_history”,“stimulus”,“key_press”,“Trial_ID”,“Trial_Type”,“Gain”,“Loss”,“Certain”,“Trial_Outcome”

or If that is line0, line 1 will be:

“16947.305000001506”,"{"“ID”":"“PAZA87"”}",“survey-text”,“0”,“16951”,“0.0-0.0”,“PAZA87”,“Initial Prompts”,"","","","","","","","",""

column 12 is a number

Even the curly brackets are wrapped around “”

Hey! Could you share your gitlab repo with me (tpronk) so I can take a look at the code? See Searching for experiments on Pavlovia — PsychoPy v2021.2

@thomas_pronk I’ve just shared the code with you. Thanks so much for taking the time!

I got a notification that you made me a Guest, but I’ll need a role with more permissions than that; see guide I sent earlier

thanks @thomas_pronk . You are now a developer.

The first couple of lines of data obtained from experiment in json format is:

“[{“trial_type”:“pavlovia”,“trial_index”:0,“time_elapsed”:2746,“internal_node_id”:“0.0-0.0”,“subject”:“parisaz87test”},{“rt”:10972.60000000149,“responses”:”{\“Q0\”:\“parisaz87test\”}",“trial_type”:“survey-text”,“trial_index”:1,“time_elapsed”:13720,“internal_node_id”:“0.0-1.0”,“subject”:“parisaz87test”,“Trial_Name”:“Initial Prompts”},{“view_history”:"[{\“page_index\”:0,\“viewing_time\”:939.9000000003725},{\“page_index\”:1,\“viewing_time\”:1420.0999999996275},{\“page_index\”:2,\“viewing_time\”:882},{\“page_index\”:3,\“viewing_time\”:1025.5999999996275},{\“page_index\”:4,\“viewing_time\”:3812.199999999255},{\“page_index\”:5,\“viewing_time\”:471.6000000014901},{\“page_index\”:6,\“viewing_time\”:554.2999999988824},{\“page_index\”:7,\“viewing_time\”:552},{\“page_index\”:8,\“viewing_time\”:1026.0999999996275}]",“rt”:10684.599999999627,“trial_type”:“instructions”,“trial_index”:2,“time_elapsed”:24407,“internal_node_id”:“0.0-2.0”,“subject”:“parisaz87test”,“Trial_Name”:“Instructions”},{“success”:true,“trial_type”:“fullscreen”,“trial_index”:3,“time_elapsed”:26711,“internal_node_id”:“0.0-3.0”,“subject”:“parisaz87test”},{“view_history”:"[{\“page_index\”:0,\“viewing_time\”:5512.0999999996275}]",“rt”:5512.4000000003725,“trial_type”:“instructions”,“trial_index”:4,“time_elapsed”:32224,“internal_node_id”:“0.0-4.0”,“subject”:“parisaz87test”},{“rt”:null,“key_press”:null,“trial_type”:“canvas-keyboard-response”,“trial_index”:5,“time_elapsed”:34229,“internal_node_id”:“0.0-5.0-0.0”,“subject”:“parisaz87test”,“gamble_location”:“gamble_left”,“Trial_Name”:“Visual Trial”},{“rt”:null,“stimulus”:" “,“key_press”:null,“trial_type”:“html-keyboard-response”,“trial_index”:6,“time_elapsed”:35233,“internal_node_id”:“0.0-5.0-1.0”,“subject”:“parisaz87test”,“Trial_Name”:“ISI”},{“rt”:null,“stimulus”:“Trial missed.”,“key_press”:null,“trial_type”:“html-keyboard-response”,“trial_index”:7,“time_elapsed”:37236,“internal_node_id”:“0.0-5.0-2.0”,“subject”:“parisaz87test”,“Trial_Name”:“Feedback”,“Trial_ID”:121,“Trial_Type”:2,“Gain”:4,“Loss”:0,“Certain”:2,“Trial_Outcome”:3},{“rt”:null,“stimulus”:” ",“key_press”:null,“Trial_Name”:“ITI”,“trial_type”:“html-keyboard-response”,“trial_index”:8,“time_elapsed”:38240,“internal_node_id”:“0.0-5.0-3.0”,“subject”:“parisaz87test”},

Hey again,

I forked your experiment and set it up such that the practice and main block only had one trial. Then I took part a couple of times. Each time the task redirected correctly to Qualtrics and the data got stored without any error message. So I’m afraid “it works on my machine” :). I do have some pointers though that could help us find and fix this bug:

  1. About your pavlovia plugin. I see you’re using a relatively old version of the Pavlovia plugin. For newer versions, see this thread on our forum or this thread on the jsPsych forum
  2. About reproducing the bug. If the above doesn’t solve it, we’ll need to do some targeted debugging. Given that I did get it to work but you didn’t, we’ll need to find out what’s different. Perhaps there are certain responses that give an issue? Maybe it’s the sheer size of the JSON? Doing some dedicated test-runs, perhaps in part with shortened versions of your experiment, could help pinpoint the cause.
  3. About finding the consequence of the bug. I noticed that the JSON you (at one point) copy-pasted above contains characters typically introduced by a text editor, such as Word. There are web-sites that can validate JSON and tell you where any issues lie. However, be sure that you copy-paste the JSON directly into that site, or, if you want to store it, only use plain text editors like Notepad. On this forum you can force plain text using one or three backticks (button at the top-left of your keyboard).

Hope this helps! Thomas

We did use the json validator website and the data is indeed valid JSON format.
Regarding shortening the experiment and/or upgrading the Pavlovia, rerunning and seeing if the data gets uploaded to server, is there anyway this can be done without using my CREDIT?

I’ll ask around for the latter. About the former: so have you had a case where the data sent to Pavlovia was considered valid by a validator, but rejected by Pavlovia saying “unable to JSON decode”? If so, could I see the whole JSON string?