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

numpy 2.0 update causing errors in portray server #108

Open
phoughton opened this issue Aug 16, 2024 · 0 comments
Open

numpy 2.0 update causing errors in portray server #108

phoughton opened this issue Aug 16, 2024 · 0 comments

Comments

@phoughton
Copy link

Hello,

Hope you can help,

portray errors when i run portray serve and it looks to be caused by the recent numpy update.

Using:
Python 3.11.4
portray==1.8.0

I see this error

$ portray server
Traceback (most recent call last):
  File "/home/vscode/.local/bin/portray", line 5, in <module>
    from portray.cli import __hug__
  File "/home/vscode/.local/lib/python3.11/site-packages/portray/cli.py", line 14, in <module>
    import hug
  File "/home/vscode/.local/lib/python3.11/site-packages/hug/__init__.py", line 36, in <module>
    from hug import (
  File "/home/vscode/.local/lib/python3.11/site-packages/hug/output_format.py", line 145, in <module>
    @json_convert(str, numpy.unicode_)
                       ^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.unicode_` was removed in the NumPy 2.0 release. Use `np.str_` instead.

Thanks
Pete

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

1 participant