CadQuery / cadquery

A python parametric CAD scripting framework based on OCCT
https://cadquery.readthedocs.io
Other
3.16k stars 289 forks source link

Attributeerror for bool8 to bool in numpy? #1626

Open deadmaze opened 2 months ago

deadmaze commented 2 months ago

image

Hi all, with just a basic installation of cadquery, im getting this issue:

raise AttributeError("module {!r} has no attribute " AttributeError: module 'numpy' has no attribute 'bool8'. Did you mean: 'bool'?

my numpy version is 2.0.0, do I need to downgrade it in order to use cadquery?

jmwright commented 2 months ago

See #1616

sbalk commented 1 month ago

For now, downgrade numpy to 1.23.5 because from 1.24 it's deprecated.

AnonymouZEE commented 1 month ago

same problem... please replace all numpy.bool8 with numpy.bool_ ...or avoid NumPy types for booleans

adam-urbanczyk commented 1 month ago

This is fixed in master, see #1617

YahliGilboa commented 3 weeks ago

still didnt work for me. had to revert to numpy 1.23.5

adam-urbanczyk commented 3 weeks ago

What did not work exactly in master? How did you install it? Which dep gives the error?

ulikoehler commented 3 weeks ago

I can confirm that upgrading to cadquery master fixes this issue for me.

Command I used:

pip install --user -U git+https://github.com/CadQuery/cadquery.git --break-system-packages

with current master revision = 5429f61

zakzook333 commented 2 weeks ago

Neither solution worked for me, I always get "Process finished with exit code -1073741819 (0xC0000005)" error" and I don't know why. I tried clean installation from master in virtual environment with latest pip, but I still get this error.

ulikoehler commented 2 weeks ago

@zakzook333 I believe the "Process finished fwith exit code" is a totally different error and I'd guess its opencascade related but not sure. Can you share a full stacktrace?

zakzook333 commented 2 weeks ago

I don't have a full stracktrace. I only put "import cadquery" into the script and it gives me this error. The interesting thing is that when I type "import cadquery" followed by "cadquery.Workplane('XY').box(1,2,3).toSvg()" directly into shell I get raw SVG output as I am supposed to get. But when I tried to run the script with the same code I get that error.

Edit: I tried it on new PC with fresh Python install and it works, so it's unrelated to the lib. Sorry for spam.