Description of the problem:
Hello, I am new to PsychoPy and therefore in need of some help. I have created a simple experiment, in which the participant will hear a set of words (presented as individual words from short .wav audiofiles), and will have to type what they hear in a response box. I have created a loop and also defined the files as playing randomly. The experiment works well on my computer, with good sound quality of the audiofiles. When I uploaded the experiment to pavlovia, the pilot version runs, but with only a beep sound instead of the audiofile. There is no error message at all, neither locally in psychopy builder, nor online, such that I am not sure what the source of the problem is.
Any advice would be greatly appreciated!
Might be due to WAV files not being very well-supported by browsers. You could try converting them to MP3. See this tutorial: https://staging.psychopy.org/temp/html/online/mediaFormats.html
NB - The page above is a prototype of improvements to our current documentation, so it will be moved to psychopy.org once itâs approved
Thank you for the suggestion.
I converted a few files to MP3 and tried running the experiment again. This time, it would not even run locally in psychopy on my computer, and I received the following error:
âRuntimeError: Error opening âONFP2_3_post.mp3â: File contains data in an unknown format.â
Do you have any suggestion what to do in this case?
Thank you again!
That makes sense, PsychoPy doesnât yet support MP3. Does it work online though?
Thank you for the prompt reply!
Unfortunately, it does not work online with the mp3 files. This time I do get errors when running online, as follows:
"Unfortunately we encountered the following error:
when importing condition: ON_FP2_ind_files_post/ONFP2_word_list_POST.xlsx
when getting the value of resource: ON_FP2_ind_files_post/ONFP2_word_list_POST.xlsx
unknown resource
Try to run the experiment again. If the error persists, contact the experiment designer."
I also hear the same beep/clicking noise as when using the .wav files.
Is there anything else I need to adjust/change?
Thank you!
As an update, I tried again with mp3 files instead of .wav files, and when I played it online, I heard the same beep/clicking noise, with no error message. Is there anything else that I can try to fix this issue?
Thank you again!
Could you share your experiment repo? My username is tpronk
Thank you, I just shared you on my repo.
URL: https://gitlab.pavlovia.org/mc1585/intelligibility_experiment
As an update, Iâve switched the audio files back to .wav files because after another attempt at running the experiment, the mp3 version would not even bring up the project.
Any advice would be appreciated!
When I try to open the psyexp file in builder, I get an exception :). Guess it might be a good idea to pull in the PsychoPy experts for that one. @TParsons, @jon, @Becca, might you know whatâs up here? Perhaps useful to add that the experiment contains a text stimulus with Hebrew in it.
Looks like itâs hitting an error when it tries to draw the loops as thereâs an attribute missing from one loop. I canât access the file on Pavlovia, could you share the .psyexp directly? Then Iâll have a look at whatâs going wrong with that specific loop.
Thank you!
I tried running the experiment locally, and it seemed to work on my computer. I wonder if the problem I am having with pushing it to Pavlovia (and having the audio files play) is related to these errors.
I have attached the .psyexp file as well as shared the experiment repo online.
Any advice is much appreciated!
ONFP2_intell.psyexp (17.9 KB)
Opening this locally, it looks like thereâs a loop (ONFP2_audio
) with no routines in it - Iâm not sure how to even get to that state, as removing the only routine in a loop deletes the loop usually, but thatâs almost certainly why itâs crashing! If you can open it in Builder view, does it run when you delete the empty loop?
Thank you, that solved the problem - it now works online! I deleted the extra loop, and now the sound files play as they should, both locally and online.
Two other related questions, if possible. First, I tried downloading the results of the pilot experiment (âdownload resultsâ button on the experiment page), but it only contained results from previous piloting trials, not the most current ones. Where would I find the current pilot results?
Second, the experiment (and results) contain Hebrew characters. On the results .csv files, the characters do not come up as Hebrew, rather as other, non-letter characters. Is there a way to transform these characters back into Hebrew?
Thank you again!
I think @thomas_pronk or @sotiri are better placed to help you with downloading results, but with regard to characters: Are they appearing as squares, or a weird sequence of numbers like U+05A3
? If so then thatâll be to do with the fonts you have installed on your machine, the data is still there! Excel/whatever you are viewing them in just canât render the characters as thereâs no glyph for them in whatever font youâre using.
If you download and install any of these fonts from Google:
and then in Excel set the cells with Hebrew text to be in that font, it should be readable
Thank you! Will give this a try!
Two possible explanations:
- Maybe they are stored in files instead of the database? Then theyâd be in your repo, folder data/.
- Maybe the experiment wasnât completed? Youâll know itâs completed if you see the message âThank you for your patienceâ
Thank you for the suggestions!
The experiment works great in Builder and also online (all audio files are working, and the experiment is completed until the âthank youâ message), but the piloting still does not seem to save any of the result files in the repo (data folder). The data folder contains only the result files that were completed locally, from Builder, not the .csv files from the online piloting. Any further suggestions would be appreciated!
[https://gitlab.pavlovia.org/mc1585/intelligibility_single_word_participant2]
I do not know if this is relevant, but I am also having difficulty syncing the project from Builder to Pavlovia. When I made a small change to the experiment in Builder, and attempted to sync, it created a new project. Is this related? Is there anything further I need to do to allow syncing and result saving?
Thank you in advance!
I do notice there is a difference in your exported JS between the one on gitlab and the one on run.pavlovia.org; the former has 800 lines, while the latter has 782. What might help to clear this up is the following. The steps below are for creating a new project on Pavlovia:
- In the root folder of your experiment on your hard drive, delete the folder â.gitâ
- Then sync again with Pavlovia, it will ask you whether youâd like to make a new project. Do so
Also, about WAV files. They arenât very well supported across browsers. I recommend using MP3 instead. See this doc (will later move to psychopy.org). Media formats suitable for online studies â PsychoPy v2020.2
Thank you! I will try your suggestion for creating a new project on Pavlovia.
Thank you as well for the suggestion for using MP3 files instead of .wav.
Good luck getting your study on the road!