Dear all,
I am trying to upload my experiment on Pavlovia, but this problem poped up.
URL of experiment: https://pavlovia.org/run/yuewingyin/motion-experiment-testing/html/
Description of the problem: it keeps loading and could not start the experiment.
Sorry if the post has already a solution, but I could not find any reference or suggestion online.
Hi @Winnyue, there looks like an issue with how your experiment code has been exported, because the JS code has not been uploaded. Are you getting any errors when you compile your experiment?
Hi @dvbridges, I discovered that the loop isn’t work with csv file so I changed if to excel file. The experiment runs smoothly in my computer now but the same loading problem still exists.
@dvbridges I tested the experiment a few times on my computer, it works completely fine.
Hi, sorry what I mean is, are there any errors when you attempt to sync to Pavlovia.
Oh sorry I misunderstood it.
it has no syncing problem.
Hi @dvbridges I was trying to republish the experiments again: https://pavlovia.org/run/yuewingyin/motion-experiment-testing/html/
The same problem appears. JS file cannot be created.
This is the folder i was trying to syn:
However, the js file seems not being generated…
I think the first problem to address is the use of parenthesis in your text components. PsychoPy sees these as tuples, even when used in a string. So, you need to escape those characters using a backslash, like this:
\(please press spacebar to continue\)
.
One you have done this, you should be able to export your html. For now, the brackets are causing a syntax error, and this halts the JS code production.
After this is resolved, you will need to translate your Python code in your code components into JavaScript manually. So, if you go to your code component and select a code type of “both”, you can see both code types side by side, to help with translation.
Thanks @dvbridges ! the JS file could be generated now. However, the below error popped up.
This error looks like a path error. You should make the path to the mp4 relative from your experiment folder. E.g., final motion clip2/video/demo/1.mp4
.
@dvbridges Thank you for your help. The error box disappeared but the movie could not be played in the experiment. It instead appears with a black screen.
I have checked that all the videos could be played in the folder on Pavlovia and also the location links are correct.
Please check this link: https://pavlovia.org/run/yuewingyin/motion-testing-2/html/
@dvbridges The same thing happened when I tried to upload just a movie for testing. The video could not be played and only black screen appears.
It seems to start and run ok, but when a movie plays you get a black screen. Looking at your movie stim code, it looks like your movie sizes have gone wrong. PsychoPy will default to height screen units if you have not set you experiment settings to something other than “use prefs”, so currently your video is playing in height units, (where 1 is the height of your screen) but your video is sized [1440, 758], so that means the video is sized 758 screen heights on the y-axis - this is why you cannot see it. If you want to use pixels, set your experiment settings screen units to pixels.
@dvbridges thank you for your answer. I deleted all the numbers in the movie sizes. The first few videos works, however, when I deleted the movie size inside the loop, the whole experiment return to the first stage, which is a “white slide with loading” and cannot proceed to the experiment.
@dvbridges besides there is a loading problem, if the rating scale was not able to be shown.
This is the online version:
This is what it suppose to be like:
@Winnyue, apologies I did not mean for you to delete the sizes - see the documentation for information about sizing your stim.
@Winnyue, you need to use Sliders for online, not rating scale. Slider replaces the rating scale, and so rating scale object does not work for online studies.
@dvbridges i see, sorry for misunderstanding, but i have tried changing the size to (1,0.56) as the original size of the video is 1280 x 720, the video cannot be shown either. A blank frame appears in the loop instead.