Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error opening curves (Tools:show curves): AttributeError: module 'numpy' has no attribute 'sometrue' #381

Closed
worldpoop opened this issue Jun 26, 2024 · 8 comments

Comments

@worldpoop
Copy link

worldpoop commented Jun 26, 2024

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):

  • MacOS Sonoma 14.5 x86_64
  • iMacPro (2017)
  • (pip 24.1) Python 3.10.5 (v3.10.5:f377153967, Jun 6 2022, 12:36:10) [Clang 13.0.0 (clang-1300.0.29.30)]
  • ArgyllCMS 3.2.0 (was 2.3.1b)
  • DisplayCAL 3.9.12 2024-06-23T03:41:13Z
    DisplayCal3_curves_window_error_1
    DisplayCal3_curves_window_error_2
@papoteur-mga
Copy link

@worldpoop
What is the version of Numpy?

@Wedge009
Copy link

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?

@Wedge009
Copy link

Actually, the only match for sometrue I could find is

if _Numeric.sometrue(

and a couple of instances in the wxpython package. Maybe it's enough just to change sometrue to any in this case?

@papoteur-mga
Copy link

Actually, the only match for sometrue I could find is

if _Numeric.sometrue(

and a couple of instances in the wxpython package. Maybe it's enough just to change sometrue to any in this case?

And what happens if you change sometrue by any?

@eoyilmaz
Copy link
Owner

This should now be fixed with 3ee7cca and will be released with DisplayCAL 3.9.14

@Wedge009
Copy link

Tested at 8903be9 - the specific issue of numpy.sometrue seems to be resolved with merging of #408 but it looks like there are lingering references to wxenhancedplot._Numeric in wxLUTViewer:

# Both axis specified in Draw
p1 = plot._Numeric.array(
[xAxis[0], yAxis[0]]
) # lower left corner user scale (xmin,ymin)
p2 = plot._Numeric.array(
[xAxis[1], yAxis[1]]
) # upper right corner user scale (xmax,ymax)

I tested the changes in #430 and this seems to resolve the lingering problem.

@d1ffuser
Copy link

d1ffuser commented Nov 7, 2024

I'm still encountering this issue in version 3.9.14.

Am I missing something?

I very much appreciate the work everyone is putting in to keep this project alive.

@eoyilmaz
Copy link
Owner

eoyilmaz commented Nov 7, 2024

#430 , which was solving the remaining issues related to numpy, is merged but not released yet. It will be available in DisplayCAL 3.9.15, which we should have released by now but still waiting to solve some Windows related issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants