| Reference | Downloads | Github

Orientation of stimuli - backwards in JS vs Python

URL of experiment:

The orientation of stimuli is flipped when executing my experiment in python (i.e. locally) vs when In the task bars rotate either clockwise or anticlockwise.

I am using builder to create an online experiment where Ps are presented with bars that are rotated and participants have to indicate whether the rotation is clockwise or anticlockwise. I have defined the changes in angle of the bars in csv files (see under resources). When I implement the experiment locally, a positive change in orientation (i.e. a bar going from 20deg, to 40deg) appears on the screen as a clockwise rotation (as you would expect). When I implement it through Pavlovia - a positive change in orientation appears on the screen as an anticlockwise rotation (which is backwards to what you would expect).

Is this a bug in my code, or is this just a difference in the way online and local experiments are setup?

This isn’t an issue for me (because I am only going to do online experiments) - but I thought it might be worth noting in case someone wanted to run the experiment both locally and online this might create an issue.


You’re not the only one reporting this: Orientation of an ImageStim is set differently in local and online versions

From what I can tell this is just what it looks like, for some reason rotation is inverted in PsychoJS versus PsychoPy. I’ll flag it for the developers.



Has anyone managed to find a fix to this issue? I am still experiencing this issue.

Update to the most recent version of PsychoPy, it was fixed in 2020.2.

I am dragging up this old thread but I will have that problem with the flipped orientations and I am using Psychopy 2020.2.4.

Are you sure this got fixed in the 2020.2 version, in a later one than the 2020.2.4?


There’s a patch note saying it was fixed in 2020.2, at least. Was your experiment originally created in 2020.2.4 or an older version?

I am also still having this problem, even on the newest version of psychopy. I am not sure why it isn’t working on mine.

Hi Jonathan, thanks for your reply and yeah, I read exactly the same. Yes, it was coded in 2020.2.4. It is the version I am still using and the issue remained.

I suspect this boils down to something still using outdated code. I would update to the newest version of PsychoPy, change something irrelevant about your experiment, and then re-sync it and see if that fixes the problem. When it recompiles in JS it will hopefully use the code that doesn’t do this. If that doesn’t work, I will look closer at the code itself and see if I can get a sense of what’s happening.