| Reference | Downloads | Github

Pavlovia doesn't save data to database

URL of experiment:

Description of the problem:
My experiment runs without problems, but won’t save any of the data. I generated the experiment in the PsychoPy builder v.3.2.4 and added some minor things directly into the JS code related to the positioning of the stimuli. I’ve tried saving the data both with the “csv” and the “database” options. In both cases Pavlovia fails to generate any of the output data (csv and log files). When the csv option is used it does automatically download the data onto my local machine, but again no output is saved into the repository. When I run the experiment with the “database” option, it throws an error at the end saying: “unable to save data for an experiment that is not RUNNING”.

When I click the “download results” button, it gives me the following error:

I’m ready to run the experiment but can’t put it online because none of the data gets saved. Any suggestions on how to fix this?

1 Like

I believe you’re in PILOTING mode rather than RUNNING. Piloting mode is not for collecting data, just for checking the study works.

Thanks for pointing that out! Once I switched to running mode it still wouldn’t save the data, but I ended up figuring out that it was because I was redirecting to a url manually, rather than using the psychoJS.setRedirectUrls() function.

1 Like

Ah, yes, from Builder (which is where I recommend you create your studies) you should set the redirect URLs in the Experiment Settings dialog box (online tab)

To follow up: I use lists in the experiment, so I want participants to get the appropriate list without manually typing it themselves.
This seemed to work:
However, as mentioned, the outputs of the experiment suddenly stopped.
Now, I’m not sure what I should write at the Experiment Settings dialog box. This is what I see:

How should I redirect?..

Thank you very much in advance,

The “Completed URL” can be formatted like a text element to include variables, e.g. “["+$expName+"&participant=”+expInfo’participant’].

Thanks, but this isn’t relevant to my issue.
In fact, it seems that it isn’t about the link I’m using - so I opened a new thread for the issue here: