Error with playing of sound in online experiment

hey @sotiri. How is it going? I hope this issue does not cause you too much of a headache. Happy to help in anyway I can. Let me know if you need more info about the study.

Hi @rosem09, thank you! I believe the issue to be opacity related. Could you try the fork below to confirm things are back in order? It’s in pilot mode https://pavlovia.org/support/tcall_100520

hi @sotiri I just tested it using the pilot mode link and it works now! Thanks so much. So what should I do now? Is the original experiment (which is in RUN mode as you know) now going to work with the original link or is the original link totally useless now?

Also you can see that this experiment was not done on the most recent version of psychopy. I know this was a JS issue but would updating help or is that totally separate form this problem?

Let me know next steps and I look forward to hearing from you soon. Thanks!

Hi @rosem09, glad to hear the problem is gone. To save from having to wait for the relevant changes to make it into PsychoJS, I have created a merge request for including a modified version of the library in ‘custom-lib’. I have also added the changes that exporting from PsychoPy latest would bring into the script and html folder.

Please note that if you now edit the project in PsychoPy and export for Pavlovia, you would need to again replace lines 5-11 in your main script to import from ‘custom-lib’ instead of ‘lib’. Of course, when a permanent fix is in place I will be making sure to follow up here with the news.

Please let me know if you need more details, x

Hi @sotiri thanks so much! At this point, I do not have to edit the project at all in PsychoPy (it is in its final version besides the change in opacity). So my questions are, do I need to replace lines 5-11 in my main script? Now that you have created a merge request, which Pavlovia experiment should I use? Hope this makes sense and thanks again for expediting the process by making a merge request.

In reading further, do I just have to accept your merge and then I am good to use my original experiment in Pavlovia? Just want to confirm. Thanks!

Hey @rosem09, yes exactly accepting the merge request just means that the existing lines 5-11 are automatically replaced with ones importing from ‘custom-lib’ and you should be good to go :+1: Afterwards it might also be useful to re-sync the project in order to download the merge results from Pavlovia on to your local copy, x

Ok I just clicked merged and I tested the version that is in RUN mode and all seems to be fixed!

One more thing, if I re-sync my project as you suggested, I would then need to add lines 5-11 tho right or does this have to go with something else?

OK great, sorry I meant re-sync as in pull down the merge results instead of pushing the code up as usual, so that your local copy is up to date with the latest fix. But OK because your study is already finished and running, I believe you are probably safe ignoring me and skipping this step entirely :blush:

Ok I will take your advice and ignore BUT I am intrigued…I worry that I am not properly synced with my local copy. What I did was sync my local copy online to Pavlovia but I never cloned the project to me local machine. I also download results by clicking the “download results” button, I never do git pulling from my local repository. Is there documentation I could follow on this? Hope this makes sense. And as always, thanks so much for your help here.

Hi @rosem09, I was only hesitating about the syncing changes locally step because I had not tried it myself before and there is always that risk of things going south. I just ran a little test and it seems to be working as expected. Therefore if you open your project in PsychoPy and hit the sync button it should do the git pulling for you no problem. As an extra precaution for this operation to succeed, please make sure your online options are set to export HTML manually as shown in the screenshot attached, x

Thanks @sotiri for the detailed answer. As you said since I am not making changes to the experiment, I prob will skip this step for now :grinning: but I see what you are saying and it seems that I could do the syncing so that my local JS copy matches the git JS version and I would not have to manually add those lines as it will do the git pulling for me.

It would be awesome if you could let me know when the permanent fix is in place!

Alright @rosem09, will do, thanks, x

1 Like

Hi @rosem09, hope you’re well, PsychoPy 2021.1.4 is just out with a permanent fix for dynamically adjusting opacity in JS so you should no longer have to rely on any custom patches for that. Please let me know if you hit any hurdles upgrading, x

Hi @sotiri . Thanks so much for letting me know! As my study is currently in process, I am not going to update just yet. With that said, I will definitely update before I commence my next study.

Sounds good @rosem09, thanks, good luck with your study :sunny:

1 Like

Hi @sotiri ! Back in April 2021, you told me to let you know if I hit any hurdles upgrading. Well, now after over 180 participants ran through my study, we are ready to upgrade for the new study to the latest Psychopy and PsychJS version. Yesterday, I updated to PsychPY 2021.2.3 for my macOS (I am still running on Mojave 10.14.6 but am happy to upgrade).

When I updated and tried to run through my study, all of my sounds were replaced by the beep (‘A’) sound and the images were not appearing. I had not changed my experiment at all and as you know, the experiment was running fine with a lot of Ss using previous versions of Psychopy and PsychoJS. I dug into this issue and found that sometimes this is due to formatting issues with the condition files. I inspected my condition files and none of the formatting seems off. I even deleted and re-added the first condition file in my experiment. I checked that the sound variable is called in the experiment too (instead of an ‘A’ sound). With that said, when I briefly inspected the python script, you can see that ‘A’ sounds are still called even when the correct sound variable is called in the GUI.

As you may remember, my experiment is long and the images and sounds in the directory are stored in sub folders. I know this is not recommended but it has never been a problem for me (as long as the correct path is called in the condition file). Could this be the issue? I have not pushed the updated version to Pavlovia as I want it to be able to run in Psychopy first.

It could also be that once I updated, I renamed the experiment and saved it in the same folder as the older experiment which also contains the resource folder from the older experiment…

If it helps, I attached my experiment and the condition file for the first loop.
TCALL_F21_081921.psyexp (376.3 KB)
TCALL_F21_081921.py (276.4 KB)
B1preCOMP.xlsx (17.9 KB)

I really appreciate your help. Please let me know if you need more information. Thank you so much :slight_smile:

Maya

hi again. So I moved all contents of the experiment to a new folder (copied and pasted the images and sounds that still appear in subfolders within the main directory). BTW, this experiment was originally build in version 2020.1.2.

This time, for 3 trials, the images and sounds appeared (although the sounds sounded chipmunk like) and I DON’T hear the beeps. BUT after the 3rd trial, the images disappeared and the sounds just repeated instead of moving onto the next trial. I check and the loop is 1 and set to random. So odd. Does anyone have any idea here? Happy to give more details too. I am reattaching my experiment here and including the condition file for the first block.

TCALL_F21_082421_lastrun.py (276.2 KB)
TCALL_F21_082421.psyexp (376.3 KB)
B1preCOMP.xlsx (17.9 KB)

@Becca @wakecarter any ideas? (sorry for the multiple posts)

UPDATE on 10/6: Hi everyone. I wanted to let you know that I solved this problem. The issue was stemming from the fact that the images were not being uploaded to gitlab, even though I had added them to the ‘additional resources’ list in psychopy. I then manually added the missing images directly to gitlab and it fixed it. Hope this helps!

hi all. Just checking in to see if anyone can help me here. In looking at the forum, it seems like other people have run into this issue. I followed the instructions outlined here Practice file (xlsx) cannot be found - #4 by wakecarter aka I renamed the experiment, moved it and the images, sounds, and condition files to a new folder. I then manually added the resources in the settings → online window as only some automatically appeared.

I then re-synced to pavlovia. This time, I do NOT get an unknown resource errors but it does say it cannot find the following image even though that image IS in the resource list under settings → online.

As I mentioned above, this experiment was running fine in an older version. Thanks so much.