0
$\begingroup$

Rosanswers logo

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/122266/how-can-i-fix-unable-to-handle-index-format-version-2-please-update-rosdistro/ and there is also a related question here: http://answers.ros.org/question/49143/problems-with-rqt-groovy-ubuntu/?answer=49153#post-id-49153

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


Originally posted by Jabro on ROS Answers with karma: 5 on 2014-02-16

Post score: 0


Original comments

Comment by ahendrix on 2014-02-16:
Which OS is your youbot running? Which version of rosdep do you have installed?

Comment by Jabro on 2014-02-17:
I'm running Ubuntu 12.04 LTS, I'll check the rosdep verison later, when I have access to the robot

Comment by Jabro on 2014-02-17:
rosdep version is 0.10.25-1 for python 2.7

Comment by Dirk Thomas on 2014-02-17:
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)"

Comment by Jabro on 2014-02-18:
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?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

Please see http://answers.ros.org/question/49143/problems-with-rqt-groovy-ubuntu/?answer=49153#post-id-49153


Originally posted by Dirk Thomas with karma: 16276 on 2014-02-18

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Jabro on 2014-02-19:
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.

Comment by Dirk Thomas on 2014-02-19:
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.

Comment by Jabro on 2014-02-23:
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.

Comment by William on 2014-02-24:
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.

Comment by Jabro on 2014-02-24:
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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.