Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

rosdep update throws ROS_PYTHON_VERSION warning #722

Closed
mikaelarguedas opened this issue Oct 19, 2019 · 7 comments · Fixed by #725
Closed

rosdep update throws ROS_PYTHON_VERSION warning #722

mikaelarguedas opened this issue Oct 19, 2019 · 7 comments · Fixed by #725
Assignees
Labels

Comments

@mikaelarguedas
Copy link
Contributor

In a system with nothing sourced (no ROS_* env var defined)

rosdep update
WARNING: ROS_PYTHON_VERSION is unset. Defaulting to 3

This does not crash the CLI but seems like a spurious warning. Does rosdep update need to know / do something differently based on the ROS_PYTHON_VERSION used?
Is it expected to run rosdep update with a --rosdistro argument to it ?

@sloretz
Copy link
Contributor

sloretz commented Oct 19, 2019

The warning is intentional, and was added in #708. Some packages use ROS_PYTHON_VERSION as a conditional dependency in their package.xml (ex: genpy). If ROS_PYTHON_VERSION is unset both of those evaluate to false.

To avoid that rosdep tries to pick a default value. If --rosdistro or ROS_DISTRO are given then the default comes from the rosdistro index. If that doesn't work, then it picks the version that was used to run rosdep. In that case the warning is printed because that python version might not be related to the workspace you're trying to install dependencies for.

@mikaelarguedas
Copy link
Contributor Author

mikaelarguedas commented Oct 19, 2019

I understand the purpose of the warning when there is a need to resolve / install dependencies. But I don't understand why it's being raised when rosdep update is being called.

Another way to phrase it: how should the tutorials be updated for this warning to not be displayed?

Edit: Which is another way to ask the questions from the original comment

Does rosdep update need to know / do something differently based on the ROS_PYTHON_VERSION used?
Is it expected to run rosdep update with a --rosdistro argument to it ?

@xqms
Copy link

xqms commented Oct 21, 2019

Currently I get mails from ros_buildfarm warning me about unstable doc jobs related to this issue.

Example job: http://build.ros.org/job/Kdoc__rosmon__ubuntu_xenial_amd64/9/consoleFull

The warnings are caused by rosdep init

Step 22/25 : RUN rosdep init
---> Running in 3af4520a3dcb
WARNING: ROS_PYTHON_VERSION is unset. Defaulting to 3
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run

 	rosdep update

and a hidden rosdep update later on:

03:32:01 WARNING: ROS_PYTHON_VERSION is unset. Defaulting to 3

I guess either the ros_buildfarm jobs or rosdep should be changed to avoid the warning.

@sloretz
Copy link
Contributor

sloretz commented Oct 21, 2019

@xqms @mikaelarguedas mind checking if #725 eliminates the warning in your use cases?

@mikaelarguedas
Copy link
Contributor Author

#725 Fixes the warning for me 👍

@xqms
Copy link

xqms commented Oct 21, 2019

Not really sure how to test it within ros_buildfarm (my guess: hack into the used docker images to replace/update rosdep), but from the description #725 should fix it 👍

@sloretz
Copy link
Contributor

sloretz commented Oct 22, 2019

Fixed in 0.17.1

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants