Out-of-the-blue error: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison

OS (e.g. Win10): Win7
PsychoPy version (e.g. 1.84.x): 2022.2.5
Standard Standalone? (y/n) If not then what?: Yes
What are you trying to achieve?:

Hi all, I would really, really appreaciate your help. I’ve been running my experiment for a while with no warninhs or errors and today, completely out of the blue (nothing in the experiment changed), I started getting this:

C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\shape.py:251: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if value == "circle":

What did you try to make it work?:

I tried reinstalling both Python and Psychopy but it doesn’t go away. It created a hundred of copies of this warning. NOWHERE do I have the line: if value == “circle”.
I am wrecking my brain as to what happened.

FutureWarning is something developers put in packages to warn you that something is going to stop working in a future version - in this case the package is numpy, it looks like they’re planning to change how equals comparisons to arrays work and are warning us.

The line in question is within the psychopy library - we’ll adjust it to fit with how numpy are wanting us to compare arrays so this error stops appearing (and so that PsychoPy doesn’t suddenly break when numpy remove this altogether!), but in the meantime you should be perfectly fine ignoring this warning :slight_smile:

1 Like