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

Attributeerror for bool8 to bool in numpy? #1626

Open
ghxstweb opened this issue Jul 12, 2024 · 12 comments
Open

Attributeerror for bool8 to bool in numpy? #1626

ghxstweb opened this issue Jul 12, 2024 · 12 comments

Comments

@ghxstweb
Copy link

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
Copy link
Member

See #1616

@sbalk
Copy link

sbalk commented Aug 21, 2024

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

@AnonymouZEE
Copy link

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

@adam-urbanczyk
Copy link
Member

This is fixed in master, see #1617

@YahliGilboa
Copy link

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

@adam-urbanczyk
Copy link
Member

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

@ulikoehler
Copy link

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
Copy link

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
Copy link

@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
Copy link

zakzook333 commented Sep 13, 2024

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.

@joe-cho
Copy link

joe-cho commented Oct 17, 2024

When will this fix be released? it's urgent to me.

@davidedelvento
Copy link

davidedelvento commented Nov 23, 2024

AttributeError: 'Editor' object has no attribute 'run_cell_action'

A decent workaround is to run the following. This is assuming you have a dedicated virtual environment for this, if you don't, you are likely to break other things. If you use conda/mamba, I have no idea, since I don't use them

pip install nlopt==2.7.1
pip install numpy==1.23.5
pip install spyder==5

Explanation:

But yes, it would be nice to have such things included in the requirements.txt rather than having to reverse engineering it.

With this, it appears to be working (but I have done only minimal tests so far)

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

10 participants