-
Notifications
You must be signed in to change notification settings - Fork 222
Open
Labels
Description
I got following place set up:
$ labgrid-client show
Place 'K-00-04383':
matches:
rlabE-srv/io-5.56-out0/NetworkLXAIOBusPIO
rlabE-srv/io-5.56-out1/NetworkLXAIOBusPIO
acquired: None
acquired resources:
created: 2025-06-17 18:16:51.606776
changed: 2025-09-16 11:48:25.394207
Matching resource 'LXAIOBusPIO' (rlabE-srv/io-5.56-out0/NetworkLXAIOBusPIO/LXAIOBusPIO):
{'acquired': None,
'avail': True,
'cls': 'NetworkLXAIOBusPIO',
'params': {'extra': {'proxy': 'rlabE-srv.labmgmt.stw.pengutronix.de',
'proxy_required': False},
'host': 'rlabe-srv.labmgmt.stw.pengutronix.de:8080',
'invert': False,
'node': '4DO-3DI-3AI-00005.00056',
'pin': 'OUT0'}}
Matching resource 'LXAIOBusPIO' (rlabE-srv/io-5.56-out1/NetworkLXAIOBusPIO/LXAIOBusPIO):
{'acquired': None,
'avail': True,
'cls': 'NetworkLXAIOBusPIO',
'params': {'extra': {'proxy': 'rlabE-srv.labmgmt.stw.pengutronix.de',
'proxy_required': False},
'host': 'rlabe-srv.labmgmt.stw.pengutronix.de:8080',
'invert': False,
'node': '4DO-3DI-3AI-00005.00056',
'pin': 'OUT1'}}
Then I tried to erroneously add new named resources (Should have dropped the last component):
$ labgrid-client del-match rlabE-srv/io-5.56-out0/NetworkLXAIOBusPIO/LXAIOBusPIO
Server error: Match rlabE-srv/io-5.56-out0/NetworkLXAIOBusPIO/LXAIOBusPIO does not exist in K-00-04383
$ labgrid-client add-named-match rlabE-srv/io-5.56-out0/NetworkLXAIOBusPIO/LXAIOBusPIO OUT0
$ labgrid-client add-named-match rlabE-srv/io-5.56-out1/NetworkLXAIOBusPIO/LXAIOBusPIO OUT1
$ labgrid-client del-match rlabE-srv/io-5.56-out1/NetworkLXAIOBusPIO/LXAIOBusPIO
and then I got labgrid-client show
to break:
$ labgrid-client show
Place 'K-00-04383':
matches:
Traceback (most recent call last):
File "/usr/ptx-venvs/labgrid/lib/python3.13/site-packages/labgrid/remote/client.py", line 2171, in main
session.loop.run_until_complete(coro)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/usr/ptx-venvs/labgrid/lib/python3.13/site-packages/labgrid/remote/client.py", line 500, in print_place
place.show(level=1)
~~~~~~~~~~^^^^^^^^^
File "/usr/ptx-venvs/labgrid/lib/python3.13/site-packages/labgrid/remote/common.py", line 280, in show
for match in sorted(self.matches):
~~~~~~^^^^^^^^^^^^^^
File "/usr/ptx-venvs/labgrid/lib/python3.13/site-packages/attr/_make.py", line 1713, in __lt__
return attrs_to_tuple(self) < attrs_to_tuple(other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'str' and 'NoneType'
Resolution was removing these resource again, but it probably makes sense for Labgrid to not get into a situation where listing places triggers a backtrace.
jonrebm