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: module 'numpy' has no attribute 'bool8' #11

Closed
alfredopalhares opened this issue Sep 19, 2024 · 2 comments
Closed

AttributeError: module 'numpy' has no attribute 'bool8' #11

alfredopalhares opened this issue Sep 19, 2024 · 2 comments

Comments

@alfredopalhares
Copy link

Hello,

I now have this error in all the comands: AttributeError: module 'numpy' has no attribute 'bool8'. Did you mean: 'bool'?

-> % ruggedbox 5 4 6 --lid -f stl
Traceback (most recent call last):
  File "/home/masterkorp/.local/bin/ruggedbox", line 5, in <module>
    from cqgridfinity.scripts.ruggedbox import main
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/cqgridfinity/__init__.py", line 15, in <module>
    from .gf_obj import GridfinityObject
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/cqgridfinity/gf_obj.py", line 30, in <module>
    import cadquery as cq
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/cadquery/__init__.py", line 22, in <module>
    from .occ_impl import exporters
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/cadquery/occ_impl/exporters/__init__.py", line 10, in <module>
    from ...cq import Workplane
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/cadquery/cq.py", line 62, in <module>
    from .sketch import Sketch
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/cadquery/sketch.py", line 28, in <module>
    from .occ_impl.sketch_solver import (
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/cadquery/occ_impl/sketch_solver.py", line 3, in <module>
    from nptyping import NDArray as Array
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/nptyping/__init__.py", line 30, in <module>
    from nptyping.ndarray import NDArray
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/nptyping/ndarray.py", line 32, in <module>
    from nptyping.shape_expression import (
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/nptyping/shape_expression.py", line 35, in <module>
    from nptyping.typing_ import Literal
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/nptyping/typing_.py", line 66, in <module>
    Bool8: TypeAlias = np.bool8
                       ^^^^^^^^
  File "/home/masterkorp/.local/share/pipx/venvs/cqgridfinity/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'bool8'. Did you mean: 'bool'?

I have 0.5.6 installed.

-> % pipx list
venvs are in /home/masterkorp/.local/share/pipx/venvs
apps are exposed on your $PATH at /home/masterkorp/.local/bin
manual pages are exposed at /home/masterkorp/.local/share/man
   package cqgridfinity 0.5.6, installed using Python 3.12.4
    - gridfinitybase
    - gridfinitybox
    - ruggedbox

Any ideas on what this could be ?

@michaelgale
Copy link
Owner

This is caused by a CadQuery dependency on the version of numpy. See this issue for details: CadQuery/cadquery#1626
I'm not familiar with how far the CadQuery team got to resolving this issue, but I suspect if you install a newer version of CadQuery then this will likely resolve it.

@estribiyo
Copy link

Solved in CadQuery's master branch...

pip install git+https://github.com/CadQuery/cadquery.git

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

3 participants