0
$\begingroup$

Rosanswers logo

When I run some tools I get an error like this:

... Unable to handle 'index' format version '2', please update rosdistro ...

For example rosdep update gives this:

ERROR: Rosdep experienced an error: Unable to handle 'index' format version '2', please update rosdistro
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.10.24

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 121, in rosdep_main
    exit_code = _rosdep_main(args)
  File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 264, in _rosdep_main
    return _no_args_handler(command, parser, options, args)
  File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 272, in _no_args_handler
    return command_handlers[command](options)
  File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 437, in command_update
    error_handler=update_error_handler)
  File "/usr/lib/pymodules/python2.7/rosdep2/sources_list.py", line 433, in update_sources_list
    for d, dist in get_index().distributions.items():
  File "/usr/lib/pymodules/python2.7/rosdep2/rosdistrohelper.py", line 58, in get_index
    _RDCache.index = rosdistro.get_index(_RDCache.index_url)
  File "/usr/lib/pymodules/python2.7/rosdistro/__init__.py", line 109, in get_index
    return Index(data, base_url)
  File "/usr/lib/pymodules/python2.7/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']))
AssertionError: Unable to handle 'index' format version '2', please update rosdistro

Also bloom-release ... gives this:

Traceback (most recent call last):
  File "/usr/bin/bloom-release", line 9, in <module>
    load_entry_point('bloom==0.4.4', 'console_scripts', 'bloom-release')()
  File "/usr/lib/pymodules/python2.7/bloom/commands/release.py", line 797, in main
    args.new_track, not args.non_interactive, args.pretend)
  File "/usr/lib/pymodules/python2.7/bloom/commands/release.py", line 590, in perform_release
    release_repo = get_release_repo(repository, distro)
  File "/usr/lib/pymodules/python2.7/bloom/commands/release.py", line 207, in get_release_repo
    url = get_repo_uri(repository, distro)
  File "/usr/lib/pymodules/python2.7/bloom/commands/release.py", line 179, in get_repo_uri
    release_file = get_release_file(distro)
  File "/usr/lib/pymodules/python2.7/bloom/commands/release.py", line 157, in get_release_file
    _rosdistro_release_files[distro] = rosdistro.get_release_file(get_index(), distro)
  File "/usr/lib/pymodules/python2.7/bloom/commands/release.py", line 150, in get_index
    _rosdistro_index = rosdistro.get_index(rosdistro.get_index_url())
  File "/usr/lib/pymodules/python2.7/rosdistro/__init__.py", line 109, in get_index
    return Index(data, base_url)
  File "/usr/lib/pymodules/python2.7/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']))
AssertionError: Unable to handle 'index' format version '2', please update rosdistro

This version of bloom is '0.4.4', but the newest available version is '0.4.7'. Please update.

roslocate info <pkg> --distro hydro also produces warnings:

# rosdistro.get_cached_release() has been deprecated in favor of the new function rosdistro.get_cached_distribution() - please check that you have the latest versions of the Python tools (e.g. on Ubuntu/Debian use: sudo apt-get update && sudo apt-get install --only-upgrade python-bloom python-rosdep python-rosinstall python-rosinstall-generator)
# rosdistro.get_release_cache() has been deprecated in favor of the new function rosdistro.get_distribution_cache() - please check that you have the latest versions of the Python tools (e.g. on Ubuntu/Debian use: sudo apt-get update && sudo apt-get install --only-upgrade python-bloom python-rosdep python-rosinstall python-rosinstall-generator)
# rosdistro.get_source_file() has been deprecated in favor of the new function rosdistro.get_distribution_file() - please check that you have the latest versions of the Python tools (e.g. on Ubuntu/Debian use: sudo apt-get update && sudo apt-get install --only-upgrade python-bloom python-rosdep python-rosinstall python-rosinstall-generator)

How can I resolve these errors and warnings?


Originally posted by William on ROS Answers with karma: 17335 on 2014-01-24

Post score: 4

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

These errors are occurring because the files which describe the packages which are released into ROS distributions were changed as part of the REP-0141 (http://www.ros.org/reps/rep-0141.html) roll out. These files are hosted for the ROS community on github.com (https://github.com/ros/rosdistro), and are accessed via a python library called rosdistro (https://github.com/ros-infrastructure/rosdistro).

In order to resolve these errors must at least upgrade the python library rosdistro to a version greater than or equal to 0.3.0. However, it is highly recommend to update all of the tools which directly use rosdistro as well. Upgrade instructions differ for Ubuntu/Debian and other systems, only use the Ubuntu instructions on Ubuntu.

For Ubuntu and Debian

On Ubuntu and Debian you can upgrade these packages by running these apt-get commands in the terminal:

sudo apt-get update
sudo apt-get install --only-upgrade python-rosdistro python-rosdep python-rosinstall python-rosinstall-generator python-bloom

The above commands will first get a fresh list of available packages and then it will upgrade any of those packages listed but only if they are already installed. For example, If you do not have python-bloom installed currently this command will not install it.

For Other Systems

For non Debian based systems you can use Python's pip tool to install upgrades to your packages. If you have installed one of the affected packages, with pip already then you can upgrade them with this command:

# Do not run this on Ubuntu, it can cause you to not get updates automatically from apt-get
sudo pip install --upgrade <package_name>

Replace the <package_name> above with the package you want to upgrade, these are the affected packages and the versions they should be at:

  • rosdistro >= 0.3.0
  • rosdep >= 0.10.25
  • rosinstall >= 0.7.2
  • rosinstall_generator >= 0.1.6
  • bloom >= 0.4.7

You can see which packages you have installed with pip freeze.

If you have trouble installing bloom from pip with this error or a similar one:

% sudo pip install --upgrade bloom
Requirement already up-to-date: bloom in /Library/Python/2.7/site-packages
Requirement already up-to-date: catkin-pkg>=0.1.14 in /Library/Python/2.7/site-packages (from bloom)
Requirement already up-to-date: distribute in /Library/Python/2.7/site-packages (from bloom)
Could not find any downloads that satisfy the requirement empy in /Library/Python/2.7/site-packages (from bloom)
Some externally hosted files were ignored (use --allow-external empy to allow).
Downloading/unpacking empy (from bloom)
Cleaning up...
No distributions at all found for empy in /Library/Python/2.7/site-packages (from bloom)
Storing debug log for failure in /Users/william/Library/Logs/pip.log

Then you will have to add the --allow-external empy option to your pip command.


Originally posted by William with karma: 17335 on 2014-01-24

This answer was ACCEPTED on the original site

Post score: 8


Original comments

Comment by Kamiccolo on 2014-01-27:
Apparently after recent Ubuntu 12.04 ros-grooovy-* amd64 updates, packages are broken in repository ( http://packages.ros.org precise/main amd64 Packages ). Or just something doesn't update automagically,

Comment by tfoote on 2014-01-27:
@Kamiccolo The repositories for precise amd64 should be up to date. Please open a new question with your errors.

Comment by AndrewLawson on 2014-02-04:
I had the same problem as William so I tried what you suggested, but it didn't fix it; I still get the same error.

Comment by AndrewLawson on 2014-02-04:
Got it. I'm running Ubuntu, but I tried using pip to update rosdistro instead. Worked perfectly.

Comment by tfoote on 2014-02-04:
If you have installed things from pip you need to upgrade via pip. It is our recommendation not to install via pip and use apt so that it will automatically update with everything else. http://answers.ros.org/question/49143/problems-with-rqt-groovy-ubuntu/?answer=49153#post-id-49153 has a good description.

Comment by mfran89 on 2014-02-06:
Thanks for help !

Comment by Ans on 2014-05-13:
Im running Ubuntu Core 13.04, on a Udoo, and trying to install ROS following this guide http://wiki.ros.org/hydro/Installation/UDOO I'm still having the same problem with "update rosdep" except i've rosdep v. 0.10.21. Please help, I've been stuck here for a day now!

Comment by tfoote on 2014-05-13:
@Ans please ask your own question and show the output of all the above commands so we can help you.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.