A problem occured: a worker with ID 4741 doesn't` exist
Hi everyone,
After creating an experiment which consist of 3 html files ('intro', 'list 1' & 'list 2', where 'intro' is the file that controls a random, but sequential selection of either the 'list 1' or 'list 2' per each click on the link), I needed to adjust my script by adding a redirect link upon completion. So, I changed function onFinishedHandler in jatos.js file a bit into this:
function onFinishedHandler(data, sessionData) {
// Close JSON data array
send(JSON.stringify(sessionData) + ']');
if (abortedByUser) {
jatos.endStudy(false, 'Experiment aborted by user');
} else if (errorsOccured) {
jatos.endStudy(false, 'Errors occurred during the experiment');
} else {
var red_url = new URL("https://anketka.org/return.php?status=1");
red_url.searchParams.append('sn', jatos.urlQueryParameters.sn);
red_url.searchParams.append('ac', jatos.urlQueryParameters.ac);
jatos.endStudyAndRedirect(red_url);
}
document.getElementById('osweb_div').style.display = 'none';
After this, I added this part to the 'list 1' and the 'list 2':
jatos.onLoad(function() {
jsPsych.init({
timeline: timeline,
on_finish: function () {
var resultCSV = jsPsych.data.get().csv();
var red_url = new URL("https://anketka.org/return.php?status=1");
red_url.searchParams.append('sn', jatos.urlQueryParameters.sn);
red_url.searchParams.append('ac', jatos.urlQueryParameters.ac);
jatos.endStudyAndRedirect(red_url, resultCSV);
}
});
});
The problem is that when I import my study on Jatos, get a link for general single worker and send it to the company that has to distribute it, this error pops up once they click the link (as well as when I just copy the link in my browser):
"A problem occurred:
A worker with ID 4741 doesn't exist."
I would be very grateful for any king of help.
Best,
Vlada
Comments
But, it works perfectly with a link for general multiple worker.
Hi Vlada,
This will not really solve your problem, but I have two comments:
If you still need to use a general single worker, we'll figure out your problem.
Best
Hi Vlada,
About the error you have: "A worker with ID 4741 doesn't exist.". Did you activate General Single Workers in the Batch in which you are running your study? By default they are deactivated.
Best,
Kristian