OS : Mac Mojave 10.14.4 PsychoPy version v2020.2.4: Standard Standalone? (y/n) Yes
**What are you trying to achieve?:**Digit span task, two conditions, presented visually and using audio
What did you try to make it work?: Read all the existing posts and fixes, and tried them all. Checked all file extensions in conds files. Re-encoded problem files.
What specifically went wrong when you tried that?:
Unfortunately we encountered the following error:
when downloading the resources for experiment: DS1
unable to download resource: stims/ADS4.wav (4)
I think the issue is the path youāre using. The .js file is in the html folder and there is no āstimsā subfolder there (the stims are in the stims folder, a subfolder of the root). Try and remove āstimsā from the path in your components?
I donāt have any components that ref the stims folder. They all ref the condsFile so in the components it links to $audio.
I have uploaded the stims in the resources folder in the html folder.
Ah, in that case: remove the āstims/ā part from the path that youāve written in the conditions file. Your experiment is now trying to locate a stims subfolder in the html folder when you try to run the exp online (there is no stims folder in the html folder).
you might want to clean up your directory and file-structure There is āstimsā-folder in the root-folder of your experiment, then there is a stims-folder in the html-folder and a stims-folder in html-resources folder. In addition, your xlxs-condtion files appear in various folders (root, html-resources). This might help to maintain the experiment.
Iāve deleted the exisiting and done a clean upload.
The stims folder in the root is there for the local run, and the one in the rewsources is there for the js.
However I am getting an error on upload when I create a new project. If I sync again, it seems fine and the error is no longer there.
Traceback (most recent call last):
File ā/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/app/pavlovia_ui/project.pyā, line 161, in submitChanges
AttributeError: āNoneTypeā object has no attribute āprojectā
ok, here my setup. In the experiment root-folder, there is the psyexp-file, the excel-file controlling the loop and a folder (stim) containing my stimuli. When syncing, the repo reflects the local folder-structure.
Here is a toy-experiment as example stimuli.xlsx (8.4 KB) taudio.psyexp (4.4 KB)
The audio files should go in a folder called stim
I have exactly this in my $condsfile. I have another excel file controlling the outer loops ( 1 block with visual stimuli, and 1 block with audio stimuli)
I canāt see that there is anything different in mine versus yours, other than the obvious outer loop.
I am probably missing something really obvious here and am feeling pretty dumb right now!
I think I am going to redo it piece by piece and see if I can get it working.
Thanks for the comments folksā¦anyone else got anything else that might help?
Glen
Hi,
Thanks for taking the time to assist.
choose_digitSpan is the firts conds file that controls the outer loops (the blocks: visual/audio), three .xlsx is the conds file for the first set of trials (three audio files
which would be in a stims folder)
I had a bit of a catastrophe with this yesterday as I am rejigging the course I have written for UGs and the whole thing kept crashing on me. I finally got it up and running again just now.
(EDIT: This works locally, and I have tried every solution I have seen on the forum for similar problems)
I may have something in the .js script. Could be way off the mark, but I was trying a super basic version on a new .psyexp and the default in the sound component/sound setting is A
In my exp I have that set to $audio from my conditions file, which has the sound files specified.
// Initialize components for Routine "InstructionsA"
InstructionsAClock = new util.Clock();
// Initialize components for Routine "presA1"
presA1Clock = new util.Clock();
presA1audio = new sound.Sound({
win: psychoJS.window,
value: 'A',
secs: (- 1),
});
EDIT: Nopeā¦I can see later on in the .js that it does ref the audio
In your block presenting the audio-files you need to correct the join-command in the JS-part of your code-element check_keysA (see Wake Carterās crib sheet). Set code-type from Auto->JS to both.
In your visual block (set to 0 loops at the moment) you are referring to trialsA in your feedback-routine. However, trialsA appears after the feedback to the visual stimuli when the auditory stimuli are presented. Notice that edits in a routine are reflected in all copies of that routine. So, you might want to create separate feedback-routines.
In the experiment-setting you set the an out-folder (tab online) which you do really need any longer. This setting creates a folder named html copying all stim-files aso. to the html-folder.
In addition, you added the wav-files via additional resources for upload. There is no need to do this. But this also results in uploading the wav-files another time.
Not that the program is already running So for instance, PsychoPy append does not work on-line and has to be manually corrected (Array.prototype.append = [].push; see the crib sheet). But the program will be running soon.
Hey, thanks.
Iād just caught the trialsA things myself (when running locally I had that loop set to 0 reps) so that caught me out.
Iāll work through the rest now and see what I can do! I am not great with the js stuff, Iāve looked at this long enough now that I know what it is doingā¦ishā¦
I know I am a pain in the rear end, but I have reached my own limits with this one.
EDIT : done this and it works in Safari now (well begins to run at least and says all resources downloaded Wav file issue in safari but still nada in chrome/Firefox
the html-folder was a requirement in earlier PsychoPy versions. This is no longer needed but can still be used.
What do you want to achieve in this experiment? A visual and an auditory digital span block in this order? Do you want to register the RT of all key-presses or just the correctness of the response?
At the moment, your on-line version stops after registering the participantās info with a screen displaying participant info in black.
The two blocks will be (eventually) randomised and its a within p design so ptp will do both conditions. Only need correct/incorrect and that is taken from the digits and audiodigits columns in the excel file. Thios is where the join comes in.
The participant info screen needs to be edited with student information/consent etc, but responds to a space (in safari only). and beyond that it is pulling an error about the append code.
For reference for anyone else with similar issues.
It would appear that my adblocker was problematic on Firefox (presumably any adblocker on any browser) hence resources not downloading. So nothing wrong with the stims/referencing stims/condsfiles etc.
There were some other issues and one in particular is that audio files were not playing all the way through. I am in the process of rerecording the audio to extend the duration with blank space at the end of the file, hopefully this will resolve that.
I had thought this was fixed by changing the sound to ptb and changing latency to not critical, but it wasnāt a fix all. Still some work to do.
Thanks to those who have helped (especially Kris via Nicola on Friday when I was about reaady to pop!