-
Hi, I'm new to both jsPsych and cognition.run. So, it could have been me who did something wrong but let me ask you a question (by the way, thank you so much for developing these awesome platforms). I downloaded the tutorials master folder and could run all the jsPsych experiments. However, when I tested dichotic-listening experiment on cognition.run (i.e., I copied and pasted the scripts onto cognition.run's task code window + uploaded the audio files), cognition.run showed the instructions and initiated the first trial well (i.e., I heard the sound, could type my answer, and finished the first trial) but it stops there (white blank page without any sound for the second trial). I could also see the data but the data file contains only the first trial's info (as there were no more trials). This is what I pasted in cognition.run's task code box (and I uploaded the 32 audio files, too, and could hear the audio at least in the first trial). Please let me know what I might have missed... Thanks!var timeline = [];
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @kjung2 It used to be the case that cognition.run did not support folders, so the paths to the audio files would change from |
Beta Was this translation helpful? Give feedback.
-
It looks like you might be using a different version of jsPsych on cognition.run then on your local machine. In version We also changed the requirement that plugins store objects and arrays in the data as JSON-encoded strings. With that in mind, the problem is here: var subject_response = JSON.parse(data.responses).Q0; and it should be changed to var subject_response = data.response.Q0 |
Beta Was this translation helpful? Give feedback.
It looks like you might be using a different version of jsPsych on cognition.run then on your local machine. In version
6.3.0
we standardized the plugins so that the data field for any response generated by the participant isresponse
. Before this we had a variety of names likekey_press
,responses
,button_clicked
, etc.We also changed the requirement that plugins store objects and arrays in the data as JSON-encoded strings.
With that in mind, the problem is here:
and it should be changed to