I am currently setting up an experiment on Pavlovia. The experiment runs smoothly, however, at the end when terminating the experiment, participants get an error message, saying:
Unfortunately we encountered the following error:
when terminating the experiment
when uploading participant’s results for experiment
not enough previously reserved credits
I am confused about this message as 1) I do have enough credits assigned to the experiment and 2) the participants’ data is saved on my account.
Has anyone encountered this before and could let me know how to get rid of the error message to not continue bothering participants?
No, I only used the update assigned credits button.
Is there anything complex about the data such as daisy chaining two experiments or embedding a Pavlovia Survey?
Before the experiment I use a Qualtrics survey. At the end of Qualtrics survey participants are automatically forwarded to the Pavlovia experiment and their Qualtrics participant number is caught by Pavlovia.
Do you have any code in End Experiment tabs?
I end the experiment with a random sequence of letters that I coded from scratch and ask participants to end the experiment simply by closing the tab or pressing esc.
After the routine where I implement the random sequence of letters.
I end this script with this code snippet:
function importConditions(currentLoop) {
return async function () {
psychoJS.importAttributes(currentLoop.getCurrentTrial());
return Scheduler.Event.NEXT;
};
}
async function quitPsychoJS(message, isCompleted) {
// Check for and save orphaned data
if (psychoJS.experiment.isEntryEmpty()) {
psychoJS.experiment.nextEntry();
}
// Save data to Pavlovia
psychoJS.experiment.save({saveFormat: ‘csv’});
Why are you asking participants to end the experiment by aborting it (pressing escape)? Do you have partial data saving turned on? The reason for the error message is almost certainly because your End Experiment code saves the data (using up the credit token) just before Pavlovia makes its own attempt to save the same data.