Editing Pavlovia Experiments

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.

Ok, would you mind sharing the URL so I can help debug?

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.

Practice_Stimuli_Fractions_brazil.xlsx (9.5 KB)

Hello again sir,

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.)

Thank you again if I didn’t say so before.

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.

Hello again sir,

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)

image

Forgive me, I actually uploaded a new experiment altogether. I will change the previous one and report back.

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.

I took a look at your most recently updated repo at https://gitlab.pavlovia.org/MRLab/brazilianfractions, and the spreadsheet called "Practice_Stimuli_Fractions_brazil.xlsx" still has no header for column K, as shown above. The problem may be that it looks like there is a header because the text from column L overlaps. To really see it, you have to expand all your columns, or you could just delete column K. When you have done this, sync your project and make sure that the updated spreadsheet was copied into the HTML/Resources folder.

Thank you so much, it finally seems to be working. I think I wasn’t updating the correct file the entire time. I will check my other experiments as well and see if they were suffering from the same issue.

1 Like

So I have two other experiments that are still giving me trouble, BrazilianSpinners and BrazilianDecimals. I applied the adjustments to the xlsx files but when I upload, no html file is created for BrazilianDecimals on github and for BrazilianSpinners it will not even push anything to Pavlovia at all, instead I get this error from PsychoPy:

. Is this occuring because of duplicate variable names or because of something else?

It means that something went wrong and git was interrupted when trying to sync your repo, and now the files are locked. All you have to do is go to the brazilian_spinner_task/.git folder and delete the index.lock file and start again.

BTW, if you cannot see the .git folder, it means it is hidden, so you have to go to your Windows Explorer folder options and select the option to show hidden files.

Good call on the hidden file, sir. I deleted it and it uploaded on its own for the first time (initially I did it manually without a Linux terminal which took very long). However when the first trial begins I get " * when setting the image of ImageStim: spinner_Right

  • the argument: 2 is not an image" }". This is on BrazilianSpinners. I am still double checking my other experiment as BrazilianDecimals will upload through PsychoPy3 but the html file is not generated on github.

Scratch the comment about not uploading, I had a conditions file with the extensions still in it that I didn’t see before. Once I removed them it uploaded, however I am getting a new error: * when importing condition: Decimals_Block1_072418

  • extension: Decimals_Block1_072418 currently not supported.
    This is for BrazilianDecimals, the previous error for BrazilianSpinners still persists. Forgive me if my explanation of what is going on is convoluted. Thank you again for your help in these matters so far, this is the farthest I’ve gotten with these experiments as of yet.

This error is because you removed the extensions from the conditions file Choose_block_decimals.xlsx. You are trying to use the Decimals_Block1_072418.xlsx spreadsheet, but as the extension has been removed, it will not work because the browser does not know what the file type is.

So, you cannot insert the name of a conditions file into itself, because then it tries to read itself for infinity. But, you can insert the name of a conditions file that is different. For example, my cond.xlsx file attached, can call condition file A.xlsx, and from A.xlsx I can access the myFraction variable.

cond.xlsx (8.1 KB) A.xlsx (8.1 KB)

What you said made perfect sense and was a simple fix, thank you. I am down to my last error before formatting. I will be sure to inform my colleagues of this information to prevent issues with future experiments as we plan to use Pavlovia much more in the future.

With my BrazilianSpinners trial, I keep getting * when setting the image of ImageStim: spinner_Right

  • the argument: 5 is not an image" } with a different numeric value every time. Is this experiment just not compatible with Pavlovia? This is the only experiment giving me this type of error, while the others were more similar to each other.

Great, nearly there. Yes, this is a problem using filenames which start with numbers. Currently, if you put a filename in a conditions file and its starts with a number, it get parsed as a number e.g., 1.png becomes 1. I am going to request this to be fixed, but for now I am afraid you have to change the filenames.

Here is a script that will do that rename.py (107 Bytes) . It will find all png files and add the letter ‘a’ to the start of the filename. Then, all you need to do is change your conditions files to match. To use this file, just add it to the same folder as your project e.g., in the parent folder, not the html folder. You can open and run it from PsychoPys Coder. Remember to back up your images just in case. Finally, change the condition files, then resync and try again.

Let me know if you have anymore issues.

Hello again sir,

I’m having a problem with my stimuli being displayed. Does JavaScript ignore text after certain characters when given a number?
I have a stimuli that is two decimals separated by spaces like “0.1 0.9” and only the 0.1 gets displayed. If I insert a letter before the first decimal, it then displays the entire string like “x0.1 0.9”
Is there a workaround for this?