psychopy.org | Reference | Downloads | Github

Setting a variable image position


#1

Hello,

I built an experiment in which different pictures have different positions is Psychopy 1.84.2.
I updated to 1.85 so I can post my experiment online. Problem is it stopped recognizing the position coordinates in my excel file.
I tried different combinations (ie: 0.5 instead of (0.5, 0.5), and (-0.5) instead of (0.5, -0.5), I tried (0.5,0.5) instead of (0.5, 0.5), I tried seperating the number as in a column by coordinate so I inserted in the builder ($PX,$PY) )… None worked
I tried converting it into CSV, didn’t work either.
Here’s the error message I get

Any help would be much appreciated.

I’m using builder, OS: windows 7.

Cordially,
Joseph


#2

So the exact same experiment worked before and now it doesn’t in the new version? One thing I might try is deleting any .pyc files that are in the experiment folder.

Other than that we would need more information. Is this in the builder? Show a screenshot or include the code where the positions are set, that would be a start.


#3

Hi Daniel,

Thanks for your answer.
Indeed, it worked and still works in 1.84.2, but not in 1.85.0. Given that I want it online, the package psychojs doesn’t exist in 1.84.2 as far as I know (tried it…) unless there’s a way to import it.
You’ll find attached a screenshot of my excel sheet, a screenshot of the builder & the image’s position as defined in the builder.
For instance for the image TLV1Essai, it recognises the image and displays it correctly according to the image defined in my excel sheet. Given that the position is constant it is able to place it correctly.
However, for the IndiceV text and the other images that have placements defined in the excel sheet, it doesn’t recognize the position. So the program crashes when the positions change at every frame (starting from the 2nd routine of my first loop)
The code component that shows in the builder is for the mouse command & trial counts.
I forgot to mention that I also made copies and loaded the program on different computers with different OS to see if it works (Ubuntu, Windows 7, MacOS Sierra 10.12)
EDIT: Deleting .pyc files didn’t change a thing.
Thanks in advance.

Cordially,
Joseph


#4

I’m not aware of anything changing on this lately. I would do it as $(PX, PY) and set PX, PY as separate columns in your conditions file. If that doesn’t work could you let us know the error message you get for it?

For using 1.85 and online experiments, please be warned that this is in very early stages of development. We’re making it available for people to play with but it REALLY is only meant as a proof of principle. Don’t use it for anything serious right now.


#5

Hi All,
I have the exact same problem as Joseph. Same error message, still works on 1.84.2, but not 1.85. I’d love to hear if someone figures this out.
Thanks,
Dave


#6

Hi Again,
The first time I tried Jon’s suggestion it didn’t work, but I just tried again (I must have done something different, but I don’t know what it was) and it works! So in the image properties > position field I have $(px, py) and in my Excel file I have columns labels px and py.
Thank you Jon, much appreciated.
Dave