Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

JsPsych study, local JATOS saving CSV, public server saving JSON

ekmekm
edited March 2023 in JATOS

Hi, hope you're well!

(cross-posting to the jsPsych Github as well)

I'm setting up a study using JATOS 3.7.4 and plugins from jsPsych 7.3. I'd like to save the data as a CSV using jsPsych's old data.csv function to do the conversion (as below)

        var resultData = jsPsych.data.get().ignore('accuracy').ignore('internal_node_id').ignore('question_order').ignore('stimulus').filter([{trial_type:'survey'}, {trial_type:'survey-likert'}]);
        jatos.submitResultData(resultData.csv(),jatos.endStudy);

I've also attached an abbreviated version of this annotation script here (though the extension was originally .html, just changed it for uploading here).

It's working fine on my local server and saving a CSV as intended, but the exact same study is saving all results as JSON on the production server. Do you have any ideas about what might be going on?

Thanks!


Comments

  • Hi, what's the version of your production server? Are you using mindprobe?

  • Hi! Server details:

    *  OS: Red Hat Enterprise Linux Server release 7.6 (Maipo)

    *  Hardware: vmware

    *  Processor(s): 1

    *  Kernel version: 3.10.0-957.21.3.el7.x86_64

  • Hi!

    I'm pretty sure it's more of an jsPsych issue. JATOS doesn't care for the data format as long as it's some kind of text (so CSV, JSON, XML - all are fine).

    Maybe it's some kind of caching issue? Maybe locally your browser's cache is disabled, but then for your remote JATOS not?

    Best,

    Kristian

  • Hello!

    Thanks, that's a good thing to check out. I'll follow up here if anything new comes to light.

    All the best,

    -Elise

  • Okay, I did a little more testing. It looks like if you interrupt the study and close it early, it saves as JSON not as CSV (it also doesn't add the worker IDs, which was something I'd just added in the on_close function). However if you go all the way through the study, it saves the CSV and adds the worker IDs.

    Looks like on_close isn't working the way I expected it to, which is definitely a thing going on with jsPsych and not JATOS. Thanks for your time/attention anyways! :)

Sign In or Register to comment.