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

Python 3.11: ValueError: mutable default <class 'numpy.ndarray'> for field w1 is not allowed: use default_factory #61

Open
lucasw opened this issue Aug 23, 2023 · 0 comments

Comments

@lucasw
Copy link
Contributor

lucasw commented Aug 23, 2023

I'm seeing this on Ubuntu 23.04 and python 3.11, I think it's due to dataclass changes:

terminate called after throwing an instance of 'pybind11::error_already_set'
  what():  ValueError: mutable default <class 'numpy.ndarray'> for field w1 is not allowed: use default_factory

At:
  /usr/lib/python3.11/dataclasses.py(815): _get_field
  /usr/lib/python3.11/dataclasses.py(958): _process_class
  /usr/lib/python3.11/dataclasses.py(1220): wrap
  /usr/lib/python3.11/dataclasses.py(1230): dataclass
  /home/lucasw/catkin_ws/src/misc/elevation_mapping_cupy/elevation_mapping_cupy/script/elevation_mapping_cupy/parameter.py(11): <module>
  <frozen importlib._bootstrap>(241): _call_with_frames_removed
  <frozen importlib._bootstrap_external>(940): exec_module
  <frozen importlib._bootstrap>(705): _load_unlocked
  <frozen importlib._bootstrap>(1150): _find_and_load_unlocked
  <frozen importlib._bootstrap>(1176): _find_and_load
  /home/lucasw/catkin_ws/src/misc/elevation_mapping_cupy/elevation_mapping_cupy/script/elevation_mapping_cupy/elevation_mapping.py(11): <module>
  <frozen importlib._bootstrap>(241): _call_with_frames_removed
  <frozen importlib._bootstrap_external>(940): exec_module
  <frozen importlib._bootstrap>(705): _load_unlocked
  <frozen importlib._bootstrap>(1150): _find_and_load_unlocked
  <frozen importlib._bootstrap>(1176): _find_and_load
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