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

Yakut Mon fails to parse port List bitmask #117

Closed
moiflo033 opened this issue Feb 9, 2025 · 1 comment
Closed

Yakut Mon fails to parse port List bitmask #117

moiflo033 opened this issue Feb 9, 2025 · 1 comment

Comments

@moiflo033
Copy link

When a node publishes a bitmask for the on the uavcan.node.port.List publishers topic, Yakut fails to handle it correctly.
However if i switch to a sparse list everything works fine.

This can be reproduced using the following command:
yakut pub uavcan.node.port.List {}
As the default is a all false mask.

OS: Ubuntu 24.04
Yakut Version: 0.13.0
Installation method: pip3

Error:

025-02-09 17:17:10 0059763 ERR pycyphal.util._broadcast: Unhandled exception in <bound method Avatar._on_trace of Avatar(node_id=42)>: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Traceback (most recent call last):
  File "/home/opencyphal/.venv/lib/python3.12/site-packages/pycyphal/util/_broadcast.py", line 46, in delegate
    r: typing.Union[R, Exception] = fn(*args, **kwargs)
                                    ^^^^^^^^^^^^^^^^^^^
  File "/home/opencyphal/.venv/lib/python3.12/site-packages/yakut/cmd/monitor/_model.py", line 163, in _on_trace
    handler(float(ts.monotonic), obj)
  File "/home/opencyphal/.venv/lib/python3.12/site-packages/yakut/cmd/monitor/_model.py", line 100, in _on_port_list
    self._ports.pub = expand_subjects(obj.publishers)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/opencyphal/.venv/lib/python3.12/site-packages/yakut/cmd/monitor/_model.py", line 192, in expand_subjects
    if m.mask:
       ^^^^^^
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
@moiflo033
Copy link
Author

Im sorry i somehow missed Issue #108

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