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

Ros2 doctor fails to call some class functions #806

Closed
JvE-Lely opened this issue Feb 27, 2023 · 12 comments · Fixed by #860
Closed

Ros2 doctor fails to call some class functions #806

JvE-Lely opened this issue Feb 27, 2023 · 12 comments · Fixed by #860
Assignees

Comments

@JvE-Lely
Copy link

JvE-Lely commented Feb 27, 2023

Bug report

Required Info:

  • Operating System:
    • Debian buster
  • Installation type:
    • source
  • Version or commit hash:
    • Humble
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • N/A

Steps to reproduce issue

ros2 doctor --report

Expected behavior

Actual behavior

ros2 doctor --report
/opt/ros/humble/lib/python3.7/site-packages/ros2doctor/api/__init__.py: 154: UserWarning: Fail to call PackageReport class functions.
/opt/ros/humble/lib/python3.7/site-packages/ros2doctor/api/__init__.py: 154: UserWarning: Fail to call RosdistroReport class functions.

and

ros2 doctor
/opt/ros/humble/lib/python3.7/site-packages/ros2doctor/api/__init__.py: 118: UserWarning: Fail to call PackageCheck class functions.
/opt/ros/humble/lib/python3.7/site-packages/ros2doctor/api/__init__.py: 118: UserWarning: Fail to call PlatformCheck class functions.

Additional information

The following packages are installed:

 python3-catkin-pkg-modules_0.5.2-1_all.deb
 python3-lark-parser_0.7.2-1osrf~buster_all.deb
 python3-netifaces_0.10.4-1+b1_armhf.deb
 python3-numpy_1.16.2-1_armhf.deb
 python3-rosdistro_0.9.0-100_all.deb
 python3-rosdistro-modules_0.9.0-1_all.deb
 python3-rospkg_1.4.0-100_all.deb
 python3-rospkg-modules_1.4.0-1_all.deb

See also https://answers.ros.org/question/406296/optroshumblelibpython310site-packagesros2doctorapi__init__py-118-userwarning-fail-to-call-packagecheck-class-functions/

@mjcarroll
Copy link
Member

I cannot reproduce on jammy, so it may be something buster specific in this case. I will try to spin a docker container to reproduce.

@mjcarroll mjcarroll self-assigned this Feb 27, 2023
@zhuzy-2018
Copy link

i've encoutered this issue as well using humble on ubuntu 22.04.

@fujitatomoya
Copy link
Collaborator

I cannot reproduce this issue with ubuntu 22.04 and Humble.

root@tomoyafujita:~# ros2 doctor

All 5 checks passed

root@tomoyafujita:~# ros2 doctor --report
...<snip>
   PLATFORM INFORMATION
system           : Linux
platform info    : Linux-5.15.0-76-generic-x86_64-with-glibc2.35
release          : 5.15.0-76-generic
processor        : x86_64

   QOS COMPATIBILITY LIST
compatibility status    : No publisher/subscriber pairs found

   RMW MIDDLEWARE
middleware name    : rmw_fastrtps_cpp

   ROS 2 INFORMATION
distribution name      : humble
distribution type      : ros2
distribution status    : active
release platforms      : {'debian': ['bullseye'], 'rhel': ['8'], 'ubuntu': ['jammy']}

   TOPIC LIST
topic               : none
publisher count     : 0
subscriber count    : 0
...<snip>

@zhuzy-2018
Copy link

I cannot reproduce this issue with ubuntu 22.04 and Humble.

root@tomoyafujita:~# ros2 doctor

All 5 checks passed

root@tomoyafujita:~# ros2 doctor --report
...<snip>
   PLATFORM INFORMATION
system           : Linux
platform info    : Linux-5.15.0-76-generic-x86_64-with-glibc2.35
release          : 5.15.0-76-generic
processor        : x86_64

   QOS COMPATIBILITY LIST
compatibility status    : No publisher/subscriber pairs found

   RMW MIDDLEWARE
middleware name    : rmw_fastrtps_cpp

   ROS 2 INFORMATION
distribution name      : humble
distribution type      : ros2
distribution status    : active
release platforms      : {'debian': ['bullseye'], 'rhel': ['8'], 'ubuntu': ['jammy']}

   TOPIC LIST
topic               : none
publisher count     : 0
subscriber count    : 0
...<snip>

❯ ros2 doctor --report
/opt/ros/humble/lib/python3.10/site-packages/ros2doctor/api/init.py: 154: UserWarning: Fail to call PackageReport class functions.
/opt/ros/humble/lib/python3.10/site-packages/ros2doctor/api/init.py: 154: UserWarning: Fail to call RosdistroReport class functions.

NETWORK CONFIGURATION
inet : 127.0.0.1
inet4 : ['127.0.0.1']
inet6 : ['::1']
netmask : 255.0.0.0
device : lo
flags : 73<UP,RUNNING,LOOPBACK>
mtu : 65536
inet : 192.168.1.107
inet4 : ['192.168.1.107']
ether : f8:e4:e3:3f:16:e6
inet6 : ['fe80::9fb8:a835:73c6:38af%wlp82s0']
netmask : 255.255.255.0
device : wlp82s0
flags : 4163<UP,MULTICAST,RUNNING,BROADCAST>
mtu : 1500
broadcast : 192.168.1.255
ether : f8:75:a4:e7:7d:84
device : enp0s31f6
flags : 4099<UP,MULTICAST,BROADCAST>
mtu : 1500

PLATFORM INFORMATION
system : Linux
platform info : Linux-5.15.0-76-generic-x86_64-with-glibc2.35
release : 5.15.0-76-generic
processor : x86_64

QOS COMPATIBILITY LIST
compatibility status : No publisher/subscriber pairs found

RMW MIDDLEWARE
middleware name : rmw_fastrtps_cpp

TOPIC LIST
topic : none
publisher count : 0
subscriber count : 0

@ZhaoCake
Copy link

For the outputs of "ros2 doctor", it just because your proxy network may not good. I solve it by use a more quick proxy.

@ZhaoCake
Copy link

And after my test, the outputs of "ros2 doctor --report" is the same.

@Cheny5863
Copy link

i've encoutered this issue as well using humble on ubuntu 22.04.

/opt/ros/humble/lib/python3.10/site-packages/ros2doctor/api/__init__.py: 118: UserWarning: Fail to call PlatformCheck class functions.

@ZhaoCake
Copy link

My environment is just the same as yours. Do you have tried to use a quick proxy connected to US? The proxy connected to HK doesn't work when I have tested. So maybe a quick proxy to western country will work well. And when I say quick, it means a delay less than 500ms. I even got this warning when I with my proxy on, just because of the poor quality of networr connection.

i've encoutered this issue as well using humble on ubuntu 22.04.

/opt/ros/humble/lib/python3.10/site-packages/ros2doctor/api/__init__.py: 118: UserWarning: Fail to call PlatformCheck class functions.

My environment is just the same as yours. Do you have tried to use a quick proxy connected to US? The proxy connected to HK doesn't work when I have tested. So maybe a quick proxy to western country will work well. And when I say quick, it means a delay less than 500ms. I even got this warning when I with my proxy on, just because of the poor quality of networr connection.

@MatthijsBurgh
Copy link
Contributor

The package check fails, when it can't find a version of a local of req package (see compare_versions). The empty string will result in an InvalidVersion exception. Which should be catched, because the missing pkgs are collected to be logged later on.

@clalancette
Copy link
Contributor

The empty string will result in an InvalidVersion exception.

Hm, that doesn't seem to be the case here:

>>> import packaging
>>> packaging.__version__
'21.3'
>>> from packaging import version
>>> version.parse('')
<LegacyVersion('')>

What version of packaging are you using?

(I'm not against updating the code to handle this, but I want to understand the situation a bit better first)

@MatthijsBurgh
Copy link
Contributor

MatthijsBurgh commented Oct 10, 2023

I am running packaging 23.1, which does raise this issue:

>>> import packaging
>>> packaging.__version__
'23.1'
>>> from packaging import version
>>> version.parse('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/packaging/version.py", line 52, in parse
    return Version(version)
  File "/usr/local/lib/python3.10/dist-packages/packaging/version.py", line 198, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: ''

@fujitatomoya
Copy link
Collaborator

pypa/packaging#530 removes the deprecated LegacyVersion after v22.0.

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

Successfully merging a pull request may close this issue.

8 participants