Description of the problem:
In this experiment, I have 2 ways of displaying the Image stimuli. The first is through indicating the path in the Image properties and this works. The second is looping and displaying the Images from the Condition file. I had 3 columns in this file: “Images” with the path, “CorrAns” and some others. Everything worked in the Builder but when I tried to run it in Pavlovia the following error displayed:
I thought the reason was that Pavlovia could not separate the columns correctly. So I changed the Conditions file and left just one column with the Images paths. But the error did not disappear:
I don’t understand what is the problem I would be happy to see some advice. I’m a noob in programming, so I would appreciate some simplistic explanation. Thank you!
Looking at your files I think there are still some stray ! characters. Some tips to help.
you can use this script to remove the illegal characters from your filenames (open in psychopy coder and just run) file-extension-fix.py (650 Bytes)
Make sure to also remove the exclamations from the excel file (I did find replace and I think there were 5 stray ones)
in the experiment settings > online tab make sure to reload all the images in the “additional resources” section with the new file names.
After this if you encounter resource errors it will most likely be that a filename is listed in the excel sheet that does not exist in the “additional resources” section.
I am running into a similar issue. My file names do not have any special characters. I receive a similar error but the code works properly in the builder. Can you please help me work through the error?
Sorry about that. But before getting into the repo, I just want to elaborate a bit more on the issue. So I am using .pop to select images, and the experiment works with no errors in both builder and Pavlovia. However, I want to select a random element from my array and .pop only selects the last element in Javascript; .splice is able to extract elements from the middle of an array and I am piping in a random number to select from the array. However, when using .splice, I get the error noted above.
Hi There, if it is that you want to use pop() equivilently in python and javascript is it possible for you to reverse the list you are working through using the .reverse() method then select from the end myList[-1] then use pop myList.pop()?