Name Error in Builder, trying to play sound file

Hello!
I am a complete novice, so please be patient with me.

I am trying to run a number of sound stimuli linked from an excel sheet. I get this message error (see attached).

I have set “on every repeat” instead of “constant”, which I gather is a common error.
I cannot, for the life of me, understand the problem.
Many thanks,

Olivia

Update
Full error message

Running: C:\Users\Utilisateur\Desktop\Music Project\EXPERIMENT\Music_Training_exp__lastrun.py
pyo version 0.8.0 (uses single precision)
Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.1-py2.7.egg\psychopy\gui\qtgui.py”, line 215, in handleLineEditChange
e))
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xe0’ in position 0: ordinal not in range(128)
Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.1-py2.7.egg\psychopy\gui\qtgui.py”, line 215, in handleLineEditChange
e))
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-1: ordinal not in range(128)
Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.1-py2.7.egg\psychopy\gui\qtgui.py”, line 215, in handleLineEditChange
e))
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xe0’ in position 0: ordinal not in range(128)
C:\Program Files (x86)\PsychoPy2\lib\site-packages\openpyxl\reader\worksheet.py:322: UserWarning: Unknown extension is not supported and will be removed
warn(msg)
Traceback (most recent call last):
File “C:\Users\Utilisateur\Desktop\Music Project\EXPERIMENT\Music_Training_exp__lastrun.py”, line 729, in
Scale_Stimuli.setSound(Scale, secs=-1)
NameError: name ‘Scale’ is not defined

Hi Olivia,

Have you made sure that you’ve got the case right? Is it Scale or scale in your conditions file? Spelling can also be an issue too!

BW

Oliver

1 Like

You could also attach your conditions file and we might spot something off.

2 Likes

Hi Oliver,

Yes I checked and that’s not it…
Thank you though!

Olivia

Okidokes - in which case, could you post up your conditions file and the parameters that you have in your sound component? Screen shot or something will be fine - basically the variable isn’t being set and we’d need to see what values are being handed over to figure this out :slight_smile:

Hi again,

Hopefully I’m attaching the correct files! Thanks for your help

It’s better to attach the actual excel file, not a picture of it, though the screenshots of your builder settings are a good thing.

Scale1.xlsx (43.4 KB)
Sorry about that, here it is!

I’m away from my computer so I can’t test deeper, but one thing is the column name of your sound files is Sounds, but in the builder you have $Scale (should be $Sounds)

2 Likes

Hi,
I have a similar problem.
I am only starting to learn how to build my experiment (my plan is to make something similar to PASAT). For now I was just trying out basic things, following a youtube video by Kathryn Schuler (How to Create a Language Experiment Psychopy - YouTube).
I inserted a sound stimuli, but I cannot run the experiment. I tried to use different files, but nothing seems to work. Please see my error message attached.

Thank you for your help in advance!

You don’t say what version of PsychoPy you are using, but you probably need to update it:

Sorry! I am using v1.85.6 on windows 10.
I installed PsychoPy only a couple of days ago.

OK, so you should investigate the suggestion in

and see if it still applies to you and report back if there is still a bug there.

Thank you, it is working now :slight_smile: