Description of the problem: My experiment ran fine on Builder off-line. After uploading to Pavlovia, I keep getting the following error:
TypeError: undefined is not an object (evaluating 'tones.pop')
I’m really not sure how to fix this. The code it is referring to is found in one of the custom code components. The .pop command is used several times throughout my experiment, so I’m assuming this issue will occur again after fixing the tones.pop. Any help would be greatly appreciated.
Another possibility is that if you are trying to use the python “pop” function this does not translate to JS - the solution for this would to replace with shift() - seethis crib sheet PsychoPy Python to Javascript crib sheet
For the moment, this seemed to have worked. I got a new error about * ReferenceError: Can’t find variable: thisExp but I’m replacing that withpsychoJS.experiment. Thanks @Becca for the resource and @Tamer_Gezici.
Now I’m getting * TypeError: undefined is not an object (evaluating ‘this._size[0]’). I can’t find anything about that on the crib sheet (or where that even is in my code). Any ideas here??
Run the experiment, do CTRL+SHIFT+J and look at the error log when the error is thrown. There will be a list of .js files on the console, next to the error. Click the one named with your experiment name. It will show which line in particular is throwing the error.
There are several places in my experiment where I have the size of images and audio as “undefined”. Would that have anything to do with it? I left some fields blank in the component settings on the Builder.