Ask Your Question

"please update rosdistro" error when trying to execute rosdep update on ros hydro

asked 2014-02-16 21:45:13 -0500

Jabro gravatar image

updated 2014-02-17 02:56:26 -0500


I'm getting the following error when trying to execute rosdep update on my youbot running ros hydro (hint: I also have ros fuerte installed) on an Ubuntu 12.04 LTS:

`AssertionError: Unable to handle 'index' format version '2', please update rosdistro`

The complete Stacktrace:

  File "/usr/local/lib/python2.7/dist-packages/rosdep2/", line 121, in rosdep_main
    exit_code = _rosdep_main(args)
  File "/usr/local/lib/python2.7/dist-packages/rosdep2/", line 264, in _rosdep_main
    return _no_args_handler(command, parser, options, args)
  File "/usr/local/lib/python2.7/dist-packages/rosdep2/", line 272, in _no_args_handler
    return command_handlers[command](options)
  File "/usr/local/lib/python2.7/dist-packages/rosdep2/", line 437, in command_update
  File "/usr/local/lib/python2.7/dist-packages/rosdep2/", line 433, in update_sources_list
    for d, dist in get_index().distributions.items():
  File "/usr/local/lib/python2.7/dist-packages/rosdep2/", line 58, in get_index
    _RDCache.index = rosdistro.get_index(_RDCache.index_url)
  File "/usr/local/lib/python2.7/dist-packages/rosdistro/", line 109, in get_index
    return Index(data, base_url)
  File "/usr/local/lib/python2.7/dist-packages/rosdistro/", line 50, in __init__
    assert int(data['version']) == 1, "Unable to handle '%s' format version '%d', please update rosdistro" % (Index._type, int(data['version']))

This question has been asked for ROS Groovy here: and there is also a related question here:

However the soulations provided in these questions don't fix the problem I have.

edit retag flag offensive close merge delete


Which OS is your youbot running? Which version of rosdep do you have installed?

ahendrix gravatar image ahendrix  ( 2014-02-16 22:19:06 -0500 )edit

I'm running Ubuntu 12.04 LTS, I'll check the rosdep verison later, when I have access to the robot

Jabro gravatar image Jabro  ( 2014-02-17 02:11:29 -0500 )edit

rosdep version is 0.10.25-1 for python 2.7

Jabro gravatar image Jabro  ( 2014-02-17 02:54:44 -0500 )edit

The package is question is not rosdep but rosdistro. Please check the version of that pcakage - it must be 0.3.x. You can check with: python -c "import rosdistro; print(rosdistro.__version__)"

Dirk Thomas gravatar image Dirk Thomas  ( 2014-02-17 05:39:27 -0500 )edit

I checked it, the version is 0.2.17. I tried apt-get install --reinstall python-rosdistro, the console output stated that it is installing 0.3.4-1, but the error is still present and executing python -c "import rosdistro; print(rosdistro.__version__)" still leads to 0.2.17. How can I upgrade?

Jabro gravatar image Jabro  ( 2014-02-17 23:16:01 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-02-18 05:09:31 -0500

Dirk Thomas gravatar image

You have old packages installed via PIP which overlay your up-to-date Debian packages.

Please see

edit flag offensive delete link more


I never installed packages with pip, however I followed the instructions again (I tried this solution before and also mentioned it in the question) and it didn't help unfortunately. Executing python -c "import rosdistro; print(rosdistro.__version__)" still leads to 0.2.17.

Jabro gravatar image Jabro  ( 2014-02-19 00:28:34 -0500 )edit

The easiest way is to uninstall / remove all instances of rosdistro you find - e.g. by calling: python -c "import rosdistro; print(rosdistro.__file__)" and calling "locate rosdistro". Afterwards reinstall the Debian package.

Dirk Thomas gravatar image Dirk Thomas  ( 2014-02-19 04:49:19 -0500 )edit

Thanks a lot. I just removed the rosdistro folder in /usr/lib/pymodules/python2.7/rosdistro and then reinstalled the rosdistro package. This did the trick, however I think reinstalling the packing should also clean up this directory on the forehand as the package contents get installed into it. This could be a bug.

Jabro gravatar image Jabro  ( 2014-02-23 20:57:19 -0500 )edit

It isn't a bug because `apt-get` does not touch the pip python directories. If you were to have done `sudo pip uninstall rosdistro` multiple times, it would have had the same affect. Unfortunately `pip` and `apt-get` do not play nice together and that's why we recommend people do not use `pip` on debian.

William gravatar image William  ( 2014-02-24 07:21:10 -0500 )edit

I tried pip uninstall a couple of times, I was able to uninstall all the other ros packages sucessfully, however uninstalling rosidstro did neither throw any error message nor did it uninstall it correctly. But this is of course no ROS problem

Jabro gravatar image Jabro  ( 2014-02-24 20:10:26 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-02-16 21:45:13 -0500

Seen: 1,783 times

Last updated: Feb 18 '14