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

Building makehuman fails with numpy 1.24+ in compile_targets.py #217

Closed
sthen opened this issue Jan 14, 2023 · 1 comment · Fixed by #220
Closed

Building makehuman fails with numpy 1.24+ in compile_targets.py #217

sthen opened this issue Jan 14, 2023 · 1 comment · Fixed by #220

Comments

@sthen
Copy link

sthen commented Jan 14, 2023

Prior to 1.24, running compile_targets.py for makehuman displayed a deprecation warning:

cd /usr/obj/ports/makehuman-1.2.0/makehuman-1.2.0/makehuman && /usr/local/bin/python3.10 compile_targets.py
/usr/local/lib/python3.10/site-packages/numpy/lib/npyio.py:521: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
  arr = np.asanyarray(arr)

After 1.24, this has turned into an error - "Ragged array creation will now always raise a ValueError unless dtype=object is passed. This includes very deeply nested sequences." in release notes; see numpy/numpy#22004 for more. With this, compile_targets.py now fails:

cd /usr/obj/ports/makehuman-1.2.0/makehuman-1.2.0/makehuman && /usr/local/bin/python3.10 compile_targets.py
Traceback (most recent call last):
  File "/usr/obj/ports/makehuman-1.2.0/makehuman-1.2.0/makehuman/compile_targets.py", line 74, in <module>
    np.save(lpath, makehuman.getAssetLicense().toNumpyString())
  File "<__array_function__ internals>", line 200, in save
  File "/usr/local/lib/python3.10/site-packages/numpy/lib/npyio.py", line 521, in save
    arr = np.asanyarray(arr)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.

Do you have any suggestions how to fix? I don't know either numpy or makehuman particularly well, just trying to fix an OS packaging problem. Thanks!

bob-beck pushed a commit to openbsd/ports that referenced this issue Jan 16, 2023
@Aranuvir
Copy link
Collaborator

Thanks for reporting the bug. We will have to investigate...

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

Successfully merging a pull request may close this issue.

4 participants