psychopy.org | Reference | Downloads | Github

setFieldPos for ElementArrays not working correctly


#1

Hi All,

As the title suggests setFieldPos is not working properly and I think it’s an issue with the underlying code. Here’s how my thought process has gone so far:
If you do something like:

array.setFieldPos(25,-36)

You get a ValueError: unsupported value “-36” for operation when setting fieldPos in ElementArray.

So, clearly not set-up for just two values:

array.setFieldPos((25,-36))

Doesn’t produce an error, also doesn’t do anything.

array.setFieldPos((25, -36), ‘-’) produces a shift in the x coords only.

So based on this and looking at the actual elementarray code, it seems to me that it’s set up to only change the x value. Not completely sure whether that’s the case or whether I’m just inputting my values wrong. Either way I have no idea how to fix it - any help, suggestions or anything else gratefully received!

Thanks,
Becky


#2

Those operations all seem to work OK for me. Which version of psychopy are you using? Could you please post a full code example?


#3

Works for me now too. I have no idea what I did yesterday… I assume there is a lesson somewhere in this about sleeping more and coding less :wink:

Thanks nonetheless!