Robotics StackExchange | Archived questions

ros2 node list crash xmlrpc.client.Fault

I have a fresh installed ROS 2 humble, sourced the setup

when i run ros2 node list I get the following error:

Traceback (most recent call last):
  File "/opt/ros/humble/bin/ros2", line 33, in <module>
    sys.exit(load_entry_point('ros2cli==0.18.3', 'console_scripts', 'ros2')())
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2cli/cli.py", line 89, in main
    rc = extension.main(parser=parser, args=args)
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2node/command/node.py", line 37, in main
    return extension.main(args=args)
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2node/verb/list.py", line 38, in main
    node_names = get_node_names(node=node, include_hidden_nodes=args.all)
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2node/api/__init__.py", line 60, in get_node_names
    node_names_and_namespaces = node.get_node_names_and_namespaces()
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1122, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1464, in __request
    response = self.__transport.request(
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1166, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1182, in single_request
    return self.parse_response(resp)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1354, in parse_response
    return u.close()
  File "/usr/lib/python3.10/xmlrpc/client.py", line 668, in close
raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault 1: "<class 'rclpy._rclpy_pybind11.InvalidHandle'>:cannot use Destroyable because destruction was         requested">

Asked by duck-development on 2022-09-29 11:55:35 UTC

Comments

Where you able to get it solved? I also had the same problem

Asked by sdu568 on 2022-10-06 14:05:06 UTC

Yes, if you logout and then re login, it work again, but it is not a real solution

Asked by duck-development on 2022-10-11 09:43:13 UTC

I faced the similar issue. By restart the ros2 daemon on the PC might solve the issue.

ros2 daemon stop
ros2 daemon start

Asked by BCJ on 2022-11-17 21:03:54 UTC

Answers

This error happens because of your python file.

Always and always remember to add

#!/usr/bin/env python3

this^ at the top of your python file.

Asked by Dickson on 2023-06-10 03:04:04 UTC

Comments