psychopy.org | Reference | Downloads | Github

Size of stimuli format in Excel file

Hello,

I have created an Excel file for my conditions, I am asking Psychopy to alter the image and the size of the image for each repeat. In Psychopy I have set sizes to centimetres (cm) as these are what I work in.

I have then put the sizes in my Excel file like this: 4,10 or 10,25

However, when I run the experiment an error message occurs which reads “ValueError: invalid literal for float(): 4,10”

I have tried brackets/parentheses around the numbers, a space after the comma and neither seem to make the necessary correction.

Does anybody know what it doesn’t like about this format?

Thank you :slight_smile:

Hi Raegan,

Did you ever figure this out? I’m having the same problem.

Thanks!

It’s not clear to me from the original post whether the numbers are supposed to represent a single value (e.g. 4.10 but with a European-style comma as decimal point), or a pair of coordinates (e.g. (4, 10)).

If the latter, you probably need to surround the numbers in round or square brackets to let Python know you mean this to be an ordered pair of numbers, but that can get complicated. The easier thing is to separate the numbers into separate columns (e.f. one for width and one for height). Then in a Builder component, you could use them like this in a size field:

[width, height]

Hi, sorry, Micheal. I figured it out last night. I needed the square brackets. I should have posted as soon as I realized.