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

Rosdep update traceback?

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

Aaron Blasdel gravatar image

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

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
Query rosdistro index

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] :

rosdep version: 0.11.5

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/rosdep2/", line 136, in rosdep_main
    exit_code = _rosdep_main(args)
File "/usr/lib/python2.7/dist-packages/rosdep2/", line 351, in _rosdep_main
    return _no_args_handler(command, parser, options, args)
File "/usr/lib/python2.7/dist-packages/rosdep2/", line 359, in _no_args_handler
    return command_handlers[command](options)
File "/usr/lib/python2.7/dist-packages/rosdep2/", line 545, in command_update
File "/usr/lib/python2.7/dist-packages/rosdep2/", line 463, in update_sources_list
    for dist_name in sorted(get_index().distributions.keys()):
File "/usr/lib/python2.7/dist-packages/rosdep2/", line 69, in get_index
    _RDCache.index = rosdistro.get_index(_RDCache.index_url)
File "/usr/lib/python2.7/dist-packages/rosdistro/", line 100, in get_index
    yaml_str = load_url(url)
File "/usr/lib/python2.7/dist-packages/rosdistro/", 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


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 -0600 )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/ which is not part of rosdep.

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

1 Answer

Sort by ยป oldest newest most voted

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

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.

And that file looks like it hasn't been touched in over a year:

edit flag offensive delete link more


ablasdel@computername:~$ pip freeze | grep rosdep


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 -0600 )edit

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

tfoote gravatar image tfoote  ( 2017-06-08 10:37:59 -0600 )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 -0600 )edit

Question Tools



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

Seen: 281 times

Last updated: Jun 08 '17