I am having several problems with uploading experiments to Pavlovia. The experiments I already have up do not reflect the changes I make to the JavaScript file in the html folder of the experiment. Also, when other experiments are ran, they only run correctly until a trial begins, during which an error comes up saying: [insert file name here] is not defined. Any advice?
Hi @JavanMRLab, what is probably happening is that any changes you make to your JS scripts are overwritten by Builder when you sync your files with Pavlovia, because the default settings in Builder will export the JS and html when you click the sync button (thus overwriting your changes). If you wanted to only export the JS manually (i.e., not when you save or sync), you can make these changes in the Export html drop down list in the Online tab of experiment settings. However, I think you would be better off using a code component if you want to add JS code to your experiment:
Ahh, I see, thank you. Iâm also having an issue where an experiment I upload does not have itâs html file created at all. The error Iâm getting in the Python terminal is âmaximum recursion depth exceededâ. Any advice on that?
I think the infinite loop is caused by having the filename as a value in your spreadsheet, creating a mise en abyme effect, where your condition file points to a variable which points to the conditions file, in an infinite loop. Remove the column with the filename, or at least change the value of the filename in the conditions file (e.g., remove the extension).
You would be better off implementing the change from your conditions file, which is the origin of the error. To fix, you can remove the column with the filename from your conditions file.
Also is the .gitignore file necessary for the experiment to run on pavlovia? On an experiment I manually uploaded the resources for, the link for the test just opens and says âloading the experimentâ and never starts.
The conditions files are the excel or csv file that you are using in your loops in Builder. When you have this fixed, you should be able to compile and upload your experiment correctly using the sync button in Builder (see docs).
The .gitignore file is used to set which files/folders Git should ignore. I would leave it where it is.
Thank you for your help so far, I am now able to get the experiments online with the correct html file; however, when ran it says âinitializing the experimentâŚâ and does not launch the test.
I have had a look, and it looks like an issue that was fixed in PsychoPy. You have a psyexp file called FractionsBrailianUpload but you have changed the name of the experiment in the Experiment Settings to SIM2018_Fractions_Experiment. What is currently happening is that you have a JS file called FractionsBrailianUpload.js but your html file is looking for a JS file called SIM2018_Fractions_Experiment.js. We made the fix in recent versions so this could not happen anymore. To fix, you will need to change the name in Experiment Settings to match the filename - FractionsBrailianUpload (or update your version of PsychoPy to 3.1.2).
One more thing, I do not think you have applied the fix I suggested. Please take a look at the conditions file attached. I have fixed the conditions file by removing the column with the filenames in. This is what was causing the recursion error, explained above.
So I changed the experiment name and deleted the aforementioned column from the conditions file. The error I have now is * TypeError: Cannot assign to read only property âundefinedâ of object â#â. I am trying to emulate the same fixes across all my experiments but it seems the issue may not be the same among them all, so I have started to try to debug them one by one. Do you have any insight on this issue? (This is with Brazilian Fractions.)
Hi @JavanMRLab, this error is found because you have an empty column called âfraction_typeâ in your sheet called Practice_Stimuli_Fractions_brazil.xlsx. There also appears to be a column with no header, you should also remove that column as all columns need a header. You will need to remove these to avoid the error. These errors should not persist in more recent versions of PsychoPy, e.g., 3.1.3. I would also recommend updating to the latest version to avoid encountering errors that have been fixed.
So I deleted the extra column âfraction_typeâ, added a name to the unnamed column and updated to PsychoPy 3.1.3 before I uploaded again and I am still getting the same error. Forgive me for being so repetitive or if Iâve misinterpreted any advice of yours. I truly appreciate your help.
@JavanMRLab, no problem, but the problem has not been fixed. In your Practice_Stimuli_Fractions_brazil.xlsx there is still a column with no header (see below)
So I have the new upload Fractions_Brazil and the old upload BrazilianFractions and both are giving me the same error. I BELIEVE I made the necessary changes.