| Reference | Downloads | Github

Error in making the matching faces experiment

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10):
PsychoPy version (3.2.4):
Standard Standalone? (y/n) yes?:
What are you trying to achieve?:

I’m trying to replicate the example of the Glasgow Matching Faces experiment from the building experiments in Psychopy Book. However when I run the experiment it crashes

What did you try to make it work?:
I moved all the necessary parts of the experiment, so the experiment file, the same and different faces folders and the conditions file to the same folder to make sure nothing was interfering with running the experiment. Furthermore I ran the demo experiment from the online materials file to make sure it wasn’t an issue with just my experiment, the demo file runs perfectly. After knowning the demo file runs, I made sure all parts of my experiment matched the demo file and tried running my experiment again, again it crashed! I am a little stuck as python is not my strength. I have pasted the error message. I also tried changing the screen size as I’m running the experiment off my tablet which is slightly smaller than a normal screen and that did not solve the issue.

What specifically went wrong when you tried that?:
Include pasted full error message if possible.

No matter what I have tried, this is the error message, from looking at it, it appears maybe it’s a problem with my python, rather than the experiment itself?

Traceback (most recent call last):
File “C:\Users\ROB\Documents\beginner exp\Glasgow faces\Glasgow face matching”, line 90, in
texRes=128, interpolate=True, depth=0.0)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\”, line 89, in init
self.pos = numpy.array(pos, float)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\tools\”, line 32, in set
newValue = self.func(obj, value)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\”, line 1350, in pos
self.dict[‘pos’] = val2array(value, False, False)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\tools\”, line 180, in val2array
raise ValueError(msg % str(length))
ValueError: Invalid parameter. Single numbers are not accepted. Should be tuple/list/array of length 2

Thank you for the help!

Hi @rh4818, this error suggests that the position of your image stim is being set by a single number, instead of a list or tuple of x, y coordinates.

Hi David,

Thank you for pointing this out!! I had used a . instead of a , when setting my position of the stimulus. Very silly mistake on my part.

Have a good weekend, Kind regards, Rob