Ask Your Question
0

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

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

Jabro gravatar image

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

Hello,

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/main.py", line 121, in rosdep_main
    exit_code = _rosdep_main(args)
  File "/usr/local/lib/python2.7/dist-packages/rosdep2/main.py", line 264, in _rosdep_main
    return _no_args_handler(command, parser, options, args)
  File "/usr/local/lib/python2.7/dist-packages/rosdep2/main.py", line 272, in _no_args_handler
    return command_handlers[command](options)
  File "/usr/local/lib/python2.7/dist-packages/rosdep2/main.py", line 437, in command_update
    error_handler=update_error_handler)
  File "/usr/local/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 433, in update_sources_list
    for d, dist in get_index().distributions.items():
  File "/usr/local/lib/python2.7/dist-packages/rosdep2/rosdistrohelper.py", line 58, in get_index
    _RDCache.index = rosdistro.get_index(_RDCache.index_url)
  File "/usr/local/lib/python2.7/dist-packages/rosdistro/__init__.py", line 109, in get_index
    return Index(data, base_url)
  File "/usr/local/lib/python2.7/dist-packages/rosdistro/index.py", 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: http://answers.ros.org/question/12226... and there is also a related question here: http://answers.ros.org/question/49143...

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

edit retag flag offensive close merge delete

Comments

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

ahendrix gravatar imageahendrix ( 2014-02-16 22:19:06 -0600 )edit

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

Jabro gravatar imageJabro ( 2014-02-17 02:11:29 -0600 )edit

rosdep version is 0.10.25-1 for python 2.7

Jabro gravatar imageJabro ( 2014-02-17 02:54:44 -0600 )edit
1

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 imageDirk Thomas ( 2014-02-17 05:39:27 -0600 )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 imageJabro ( 2014-02-17 23:16:01 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

Dirk Thomas gravatar image

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

Please see http://answers.ros.org/question/49143...

edit flag offensive delete link more

Comments

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 imageJabro ( 2014-02-19 00:28:34 -0600 )edit
1

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 imageDirk Thomas ( 2014-02-19 04:49:19 -0600 )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 imageJabro ( 2014-02-23 20:57:19 -0600 )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 imageWilliam ( 2014-02-24 07:21:10 -0600 )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 imageJabro ( 2014-02-24 20:10:26 -0600 )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

Stats

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

Seen: 1,701 times

Last updated: Feb 18 '14