psychopy.org | Reference | Downloads | Github

No data file saved

URL of experiment: Pavlovia

Description of the problem: At the end of the experiment, no data file is saved and I get the below error message. The experiment appears to be operating as it should until this point.

Hi,

I’m sorry but I think that’s due to a mistake in my crib sheet (which was fixed a few days ago)

In code_JS

Object.prototype.upper = “”.toUpperCase;
should be
String.prototype.upper = “”.toUpperCase;

However, you only need this if you are planning to use the .upper method.

1 Like

Thank you for that suggestion!!! I had indiscriminately added all the code you suggested for the code_JS component, but I realize now you just meant those as suggestions, depending on what the experiment needs. Now I have a code component in the first routine with

BaseClock = new util.Clock();

This fixed things! Thanks!

FYI for anyone following this, @wakecarter is referring to this crib sheet (see links below), which lists common problems/solutions when translating python code components to java:

Personally I do include the ones in bold in all my experiments because I often use those functions. I’ve unbolded .toUpperCase as well as correcting it.

1 Like