psychopy.org | Reference | Downloads | Github

Experiment not exiting correctly at the end

URL of experiment: Pavlovia

Description of the problem:
My experiment runs completely until the final routine in which the participant presses the spacebar to finish the experiment. When the spacebar is pressed, it goes to this screen:


It gives an “unspecified javascript error”. After debugging a bit, I think the issue is that the experiment, rather than quitting out, tries to continue on to the next routine. Finding no next, it gives this error and does not end. However, I am not sure how to fix this.

Do you have code_JS from my crib sheet? There was an error in an earlier version of it that causes an error a bit like this:

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

1 Like

Okay thanks! Actually when I used

String.prototype.upper = “”.toUpperCase;

the experiment wouldn’t move past the first screen, but when I simply deleted

Object.prototype.upper = “”.toUpperCase; 

the experiment ran completely! Thanks!

That was probably due to intelligent quotes. It should be String.prototype.upper = "".toUpperCase; not String.prototype.upper = “”.toUpperCase;

However, there is no need to have this line in code_JS unless you are actually planning to use the .upper method.

1 Like