infinigen
infinigen copied to clipboard
Cannot import bnurbs from cpp_utils.
When trying to run the Hello World sample I hit an error where blender can't import bnurbs from the cpp_utils folder. I had a theory that it was because the bnurbs file was a .pyx file so I converted the file from Cython to Python and tried to run it again. Now I think I've really broke it. The new error is that numpy has no attribute 'bool'.
I am heavily relying on ChatGPT for any coding so bear in mind I am no programmer.
This happens every time I try to run: blender -noaudio --background --python generate.py -- --seed 0 --task coarse -g desert simple --output_folder outputs/helloworld/coarse
-
What version of the code were you using? Tell us the output of
git log -n 1
''' commit 2c818e219550776b2371364d534ef65f0a47d25f (HEAD -> main, origin/main, origin/HEAD) Author: pvl-bot [email protected] Date: Thu Jun 22 02:18:03 2023 -0400Tune default distribution ... '''
-
What command did you run?
blender -noaudio --background --python generate.py -- --seed 0 --task coarse -g desert simple --output_folder outputs/helloworld/coarse
- What are your output logs?
Color management: using fallback mode for management
Color management: Error could not find role data role.
Blender 3.0.1
Color management: scene view "Filmic" not found, setting default "Standard".
/run/user/1000/gvfs/ non-existent directory
/mnt/c/gitstuff/infinigen/worldgen/terrain/utils/kernelizer_util.py:78: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.. The issue is probably coming from __init__.py:308
AttributeType.Boolean: np.bool,
Traceback (most recent call last):
File "/mnt/c/gitstuff/infinigen/worldgen/generate.py", line 27, in <module>
from terrain import Terrain
File "/mnt/c/gitstuff/infinigen/worldgen/terrain/__init__.py", line 7, in <module>
from .core import Terrain
File "/mnt/c/gitstuff/infinigen/worldgen/terrain/core.py", line 15, in <module>
from terrain.mesher import OpaqueSphericalMesher, TransparentSphericalMesher, UniformMesher
File "/mnt/c/gitstuff/infinigen/worldgen/terrain/mesher/__init__.py", line 7, in <module>
from .uniform_mesher import UniformMesher
File "/mnt/c/gitstuff/infinigen/worldgen/terrain/mesher/uniform_mesher.py", line 12, in <module>
from terrain.utils import ASDOUBLE, ASINT, Mesh
File "/mnt/c/gitstuff/infinigen/worldgen/terrain/utils/__init__.py", line 7, in <module>
from .mesh import Mesh, write_attributes, Vars, move_modifier
File "/mnt/c/gitstuff/infinigen/worldgen/terrain/utils/mesh.py", line 20, in <module>
from .kernelizer_util import ATTRTYPE_DIMS, ATTRTYPE_FIELDS, NPTYPEDIM_ATTR, Vars
File "/mnt/c/gitstuff/infinigen/worldgen/terrain/utils/kernelizer_util.py", line 78, in <module>
AttributeType.Boolean: np.bool,
File "/home/codyd/.local/lib/python3.10/site-packages/numpy/__init__.py", line 313, in __getattr__
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'bool_'?
Blender quit
** (If this is your first time running Infinigen) What are the full output logs of install.sh
?**
I'm not sure how to find these as I've opened and closed my WSL a couple times.
Platform
- OS & OS Version: Windows 11 - Version 10.0.22621 Build 22621
- GPU (?) : NVIDIA GeForce RTX 2080 Ti
- GPU Driver Version (?) : 31.0.15.2824
- RAM (GB): 12 GB
Additional context I'm running:
- Windows Subsystem for Linux
- Python3
This was the original error before I tried to edit the bnurbs.pyx file:
Color management: using fallback mode for management Color management: Error could not find role data role. Blender 3.0.1 Color management: scene view "Filmic" not found, setting default "Standard". /run/user/1000/gvfs/ non-existent directory Traceback (most recent call last): File "/mnt/c/gitstuff/infinigen/worldgen/generate.py", line 27, in <module> from terrain import Terrain File "/mnt/c/gitstuff/infinigen/worldgen/terrain/__init__.py", line 7, in <module> from .core import Terrain File "/mnt/c/gitstuff/infinigen/worldgen/terrain/core.py", line 15, in <module> from terrain.mesher import OpaqueSphericalMesher, TransparentSphericalMesher, UniformMesher File "/mnt/c/gitstuff/infinigen/worldgen/terrain/mesher/__init__.py", line 7, in <module> from .uniform_mesher import UniformMesher File "/mnt/c/gitstuff/infinigen/worldgen/terrain/mesher/uniform_mesher.py", line 12, in <module> from terrain.utils import ASDOUBLE, ASINT, Mesh File "/mnt/c/gitstuff/infinigen/worldgen/terrain/utils/__init__.py", line 7, in <module> from .mesh import Mesh, write_attributes, Vars, move_modifier File "/mnt/c/gitstuff/infinigen/worldgen/terrain/utils/mesh.py", line 18, in <module> from .camera import getK File "/mnt/c/gitstuff/infinigen/worldgen/terrain/utils/camera.py", line 10, in <module> from placement.camera import get_camera File "/mnt/c/gitstuff/infinigen/worldgen/placement/camera.py", line 36, in <module> from . import animation_policy File "/mnt/c/gitstuff/infinigen/worldgen/placement/animation_policy.py", line 20, in <module> from assets.creatures.geometry.curve import Curve File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/__init__.py", line 1, in <module> from .genomes.beetle import BeetleFactory, AntSwarmFactory File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/genomes/beetle.py", line 17, in <module> from assets.creatures import parts File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/parts/__init__.py", line 1, in <module> from . import body, foot, wings, leg, head, \ File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/parts/body.py", line 11, in <module> from assets.creatures.creature import Part, PartFactory File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/creature.py", line 19, in <module> from assets.creatures.geometry import lofting, skin_ops File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/geometry/lofting.py", line 17, in <module> from .nurbs import nurbs File "/mnt/c/gitstuff/infinigen/worldgen/assets/creatures/geometry/nurbs.py", line 17, in <module> from .cpp_utils import bnurbs ImportError: cannot import name 'bnurbs' from 'assets.creatures.geometry.cpp_utils' (unknown location)
解决了吗 我也遇到了同样的问题
解决了吗 我也遇到了同样的问题
Not yet, I'm swamped this weekend but I'll update if I find a solution.
You can cd "/opt/infinigen/worldgen/assets/creatures/geometry/cpp_utils", and "python setup_linux.py build_ext --inplace"
Hello, I recommend @louis-fashion-ai 's solution, cd-ing into that folder and rerunning the relevant setup.py should re-attempt installation, and/or show some error message as to why it is not able to cythonize the bnurbs module. If this doesn't resolve the issue, then it may get fixed in 1.1 in a few weeks, as I have reworked installation quite a bit.