jsPsych version (e.g. 7.3.1):
Hi everyone,
I’m trying to move an experiment in “Running” stage, since it’s working fine in “Piloting”. But I keep getting this error:
[500] “unable to create a GitLab webhook: string indices must be integers” ( #None )
If the error persists, contact Pavlovia’s administrator.
Full description:
{ “error”: “[500] "unable to create a GitLab webhook: string indices must be integers" ( #None )” }
Any idea why? And how can I fix this?
Is your username (or the experiment name) a number?
No. Only letters and the experiment name has a space.
Do you have any working jsPsych experiments? Can you try a minimal one with and without a space in the experiment name?
I don’t know jsPsych so I am helping here based on first principles.
I figured out the error is with the following code, I am able to move to “Running” after removing this:
var test = {
type: jsPsychImageButtonResponse,
stimulus: jsPsych.timelineVariable('stimulus'),
choices: [
'<div style="position: absolute; top: 0; left: 0; width: 48%; height: 100vh;">f</div>', // Transparent div for left half
'<div style="position: absolute; top: 0; right: 0; width: 48%; height: 100vh;">j</div>' // Transparent div for right half
],
button_html: '<button class="jspsych-btn" style="opacity: 0;">%choice%</button>',
data: function() {
var trialData = {
task: 'response',
correct_response: jsPsych.timelineVariable('correct_response')
};
// Retrieve ID data from previous responses
var idData = jsPsych.data.get().filter({trial_type: 'survey-text'}).last(1).values()[0];
if (idData) {
trialData.StudyID = idData.StudyID;
trialData.School = idData.School;
trialData.Grade = idData.Grade;
}
return trialData;
},
on_finish: function(data) {
var response = data.response;
var correct_response = jsPsych.timelineVariable('correct_response', true);
var is_correct = (response === correct_response);
};
In PsychoJS it wouldn’t be possible to do this. Try your code without trying to access files on the server.