jsPsych version: 6.1.0, Pavlovia version: 2020.4
(sorry about formatting, I was only allowed to include two links)
Hi all,
I’ve set everything up to run my jsPsych experiment with Pavlovia, and the actual experiment displays and runs without issues (code here). However, there seems to be a problem in the communication with the Pavlovia server: I’m currently in piloting mode, and at the end of the experiment, neither is my data being redirected to the Pavlovia server (the data file remains empty), nor is the data file being downloaded by my browser as described in the documentation.
The console shows the following error:
Uncaught TypeError: jsPsych.plugins.parameterType is undefined
pavlovia /jspsych/jspsych-pavlovia-2020.4.js:82
<anonymous> /jspsych/jspsych-pavlovia-2020.4.js:593
The line of code that is being referenced (82 in jspsych-pavlovia-2020.4.js; 593 is just the closing curly bracket) is the following:
plugin.info = {
name: 'pavlovia',
description: 'communication with pavlovia.org',
parameters: {
command: {
type: jsPsych.plugins.parameterType.STRING,
pretty_name: 'Command',
default: 'init',
description: 'The pavlovia command: "init" (default) or "finish"'
},
[...]
};
If I’m not mistaken, this means that the code in my timeline file (see this file, lines 36–40, 82–83, 174–178, and 180) iniating and terminating communication with pavlovia is not being read because of some variable definition problem.
Now, when I check my jspsych.js file, it is not clear to me that “parameterType” is undefined. There are a bunch of references in there to “plugins.parameterType” (but I obviously didn’t write this code myself, so I can’t be sure what it does).
Someone else posted about this same issue before but ultimately went with running the experiment elsewhere, so this was never solved.
Can anybody tell me what part I need to define in my code? Or might this be an issue arising from conflicting jsPsych, Pavlovia, and perhaps even jQuery versions?
Thank you!
Adani