| Reference | Downloads | Github

Error: when getting the value of resource: S

URL of experiment: Pavlovia

Description of the problem: I am trying to put sound files with repeat when r is presses and continue when space is pressed. i have added a little code at the end of the routine for this :
if ‘space’ in key_resp_dissim.keys:
loop_dissim.finished = True

The experiment is working fine offline but it is showing error message (as attached image).

Can someone help me in this?
Thank you

Please show the code (preferably Python + JS or the component) causing the error. I think that S is probably the first letter in your sound file name, and you are getting it because JS is treating an array as a string.

This loop is creating problem i guess. this routine is not happenning at all.

this little code is for replay of sounds on key press (‘r’)

Thank you for reply!

As per my crib sheet, all loops need to be referred to as trials in the JS code.

Ok I did name all the loops with trials. It workd also. But trials_2 is not ending with the key press"space"
Thank you for your response.

Sorry – you misunderstood my point. trials_2 is not trials.

In Python you refer to the name of the loop.
In JS you refer to the current loop (as trials) irrespective of its real name.

Yes you are right. it is working now.
Thank you