Error opening curves (Tools:show curves): AttributeError: module 'numpy' has no attribute 'sometrue'
worldpoop opened this issue · 4 comments
Describe the bug
Two errors (gui pop-up dialog boxes) when selecting Tools:show curves. First Error:
can only concatenate str (not "NoneType) to str
Followed by Second Error -- unending pop-up repetition until closing curves
module 'numpy' has no attribute 'sometrue'
Traceback (most recent call last):
File "/Users/mau/displaycal-py3/.venv/lib/python3.10/site-packages/DisplayCAL/wxLUTViewer.py", line 2193, in OnMotion
self.UpdatePointLabel(self.client._getXY(event))
File "/Users/mau/displaycal-py3/.venv/lib/python3.10/site-packages/DisplayCAL/wxLUTViewer.py", line 2464, in UpdatePointLabel
self.client.UpdatePointLabel(mDataDict)
File "/Users/mau/displaycal-py3/.venv/lib/python3.10/site-packages/DisplayCAL/wxenhancedplot.py", line 1915, in UpdatePointLabel
if _Numeric.sometrue(
File "/Users/mau/displaycal-py3/.venv/lib/python3.10/site-packages/numpy/init.py", line 410, in getattr
raise AttributeError("module {!r} has no attribute "
DisplayCal3_curves_window_error_OUTPUT.txt
To Reproduce
When running DisplayCal3, select Tools:show curves
Expected behavior
Curves window to open without error "okay boxes" popping up continuously that prevent interaction with the curves window, until the curves window can be closed.
Screenshots
Attached
Versions (please complete the following information):
@worldpoop
What is the version of Numpy?
I calibrated a new monitor today and encountered this as well. This seems to be a result of an update to numpy 2.0:
sometrue |Use any instead.
https://numpy.org/doc/2.0/numpy_2_0_migration_guide.html
(Also, sometrue
was deprecated in numpy 1.25)
I'm not an expert on how to deal with this sort of thing, but maybe a work-around for the time being is to just cap numpy version to less than 2.0 in requirements.txt
?
Actually, the only match for sometrue
I could find is
displaycal-py3/DisplayCAL/wxenhancedplot.py
Line 1915 in 2c67f1c
and a couple of instances in the wxpython package. Maybe it's enough just to change sometrue
to any
in this case?
Actually, the only match for
sometrue
I could find isdisplaycal-py3/DisplayCAL/wxenhancedplot.py
Line 1915 in 2c67f1c
and a couple of instances in the wxpython package. Maybe it's enough just to change
sometrue
toany
in this case?
And what happens if you change sometrue
by any
?