I'm running an experiment using psychopy for my bachelor thesis. The experiment was set up last year (08/2014) using the BuilderView. After an update to the newest version of psychopy 1.82.01 a code I was using isn't working anymore. The code perfectly functioned unter 1.81.03. The aim of this code was to remember an initial rating and using this rating as a starting point for a second rating. That means in a new routine you could adjust your initial rating. The code I was using is:
Begin Routine: rating3.setMarkerPos(rating.getRating())
Does anyone know how to fix this code? Thanks a lot! Julie
Not sure what changed with the new version. For me your general approach mostly works (no crash, but not always the right position).
I used two default rating scales, in two different routines. The second one has a code component, and its important that the code component comes after the rating component within that routine (appearing lower on the screen in the routine panel). The code in Begin routine is:
rating_2.setMarkerPos(rating.getRating() - rating.low)
The error message you were getting is almost certainly because the rating.getRating()
was returning None
. That could happen if there was no response (e.g., if allowSkip
was True
and the participant skipped, or no rating had been given and your code proceeded anyway for some other reason, perhaps a time-out).
Subtracting rating.low is only needed if your ratings do not start at 0.