psychopy.org | Reference | Downloads | Github

Data from task hosted on pavlovia not saving to repository

URL of experiment:


Description of the problem: I have two tasks coded in psychoJS that are part of a study which is posted on Prolific and initializes in qualtrics.

The study flow is as follows: Qualtrics survey -> ITC_SDRD_Builder_pre_new.js -> Qualtrics Randomizer --> Qualtrics surveys --> ITC_SDRD_Builder_post_new.js --> Prolific completion page

Participants seem to be able to get through the entire experiment. However, data does not seem to be saving for the portions of the task that are hosted on pavlovia. For 2 test participants that were recruited via Prolific, data saved for the second pavlovia task, but not the first, whereas for 2 other test participants, no data saved.

Oddly, when I ran through the task myself yesterday from start to finish, all of my test data saved. Does anyone have any idea what could be driving the inconsistency here? It would seem as though for some people, the redirects out of pavlovia back to qualtrics/prolific are preventing the data from fully saving, even though participants have reported to me that they see a message saying that the data is saving.

Any suggestions would be extremely appreciated, as data collection for this study is time sensitive :confused:

Thanks in advance,
Dominic

It’s hard to know, but one thing to note is that you’ve used PsychoPy 3.0.7 to create the study and we’ve made an awful lot of fixes since then (current version is 3.2.4) including various compatibility fixes, so you might find that simply upgrading Psychopy and re-syncing the experiment will fix it

thanks, Jon. I can give that a try. However, one quick (and possibly dumb) question–– we had to make some manual edits to the code once it was converted from PsychoPy to PsychoJS, and so if I re-sync the experiment, I will have to re-do all of those manual edits, right?

Basically yes. You should try and always add your code in using the Code Components rather than hacking the JS script itself. Partly that gets around this problem but also it means in 3 years time you’ll still understnad your experiment (from its graphical representation rather than its raw code).

Good morning @dfareri1,

I have had a detailed look at your experiments. I strongly believe that the reason why your experiment data are not always saved is that you manually added code to navigate to the Qualtrics URL and to the Prolific URL in quitPsychoJS, rather than using the completionUrl approach we provide (setRedirectUrls).

The issue here is that the PsychoJS quit command is asynchronous, which means that, on occasion, it won’t have time to finish before you navigate away to Qualtrics or Prolific. That would explain why you got most of your data but not all. Does that make sense?

Once again, I would strongly encourage you to update to a more recent version of PsychoPy/PsychoJS. But certainly you need to use setRedirectUrls.

Alain

great thank you! setRedirectUrls seems to have done the trick.