ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Rosdep update traceback?

asked 2017-06-07 19:16:28 -0500

Aaron Blasdel gravatar image

updated 2017-06-08 04:43:04 -0500

Is anyone else seeing issues with 0.11.5-1 version of rosdep? I get an UnboundLocalError trace as so:

ablasdel@computername:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index.yaml

ERROR: Rosdep experienced an error:
local variable 'Request' referenced
before assignment Please go to the
rosdep page [1] and file a bug report
with the stack trace below. [1] :
http://www.ros.org/wiki/rosdep

rosdep version: 0.11.5

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 136, in rosdep_main
    exit_code = _rosdep_main(args)
File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 351, in _rosdep_main
    return _no_args_handler(command, parser, options, args)
File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 359, in _no_args_handler
    return command_handlers[command](options)
File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 545, in command_update
    error_handler=update_error_handler)
File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 463, in update_sources_list
    for dist_name in sorted(get_index().distributions.keys()):
File "/usr/lib/python2.7/dist-packages/rosdep2/rosdistrohelper.py", line 69, in get_index
    _RDCache.index = rosdistro.get_index(_RDCache.index_url)
File "/usr/lib/python2.7/dist-packages/rosdistro/__init__.py", line 100, in get_index
    yaml_str = load_url(url)
File "/usr/lib/python2.7/dist-packages/rosdistro/loader.py", line 56, in load_url
    fh = urlopen(Request(url, headers=headers), timeout=timeout)
UnboundLocalError: local variable 'Request' referenced before assignment
edit retag flag offensive close merge delete

Comments

Nope. Might be an error in the error handling, hiding some other issue. Most likely a networking issue.

William gravatar image William  ( 2017-06-07 19:32:02 -0500 )edit

Also the traceback is in rosdistro make sure your python-rosdistro package is up-to-date. If it is a bug, it will be in rosdistro/loader.py which is not part of rosdep.

William gravatar image William  ( 2017-06-07 19:33:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-06-07 19:32:51 -0500

tfoote gravatar image

It's trying to evaluate it as a local variable instead of as a constructor of a Request object. Likely from some url library.

Based on that I'm wondering what version of rosdistro you're using. That line number does not match what I see in the repository. https://github.com/ros-infrastructure...

And that file looks like it hasn't been touched in over a year: https://github.com/ros-infrastructure...

edit flag offensive delete link more

Comments

ablasdel@computername:~$ pip freeze | grep rosdep

rosdep==0.11.5

ablasdel@computername:~$ dpkg -l | grep rosdep

ii python-rosdep 0.11.5-1 all rosde package manager abstrction tool for ROS

Aaron Blasdel gravatar image Aaron Blasdel  ( 2017-06-08 04:46:52 -0500 )edit

But what about rosdistro/python-rosdistro? That's the module with the error.

tfoote gravatar image tfoote  ( 2017-06-08 10:37:59 -0500 )edit

Yeah I must have messed my packages up this resolved the problem ->

sudo apt-get install python-rosdistro python-bloom --reinstall

Aaron Blasdel gravatar image Aaron Blasdel  ( 2017-06-08 17:27:41 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-06-07 19:16:28 -0500

Seen: 281 times

Last updated: Jun 08 '17