ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Documentation tutorial error from wiki

asked 2016-11-10 16:52:59 -0600

kmhallen gravatar image

updated 2016-11-10 16:54:05 -0600

I am trying to submit several repositories for documentation following this tutorial:

The command rosdistro_reformat file://$(pwd)/distribution.yaml fails with the following output:

Traceback (most recent call last):
  File "/usr/bin/rosdistro_reformat", line 66, in <module>
    success = reformat_files(index)
  File "/usr/lib/python2.7/dist-packages/rosdistro/", line 58, in reformat_files
    return verify_files(index_url, _reformat_files)
  File "/usr/lib/python2.7/dist-packages/rosdistro/", line 67, in verify_files
    index = get_index(index_url)
  File "/usr/lib/python2.7/dist-packages/rosdistro/", line 121, in get_index
    return Index(data, base_url, url_query=url_parts.query)
  File "/usr/lib/python2.7/dist-packages/rosdistro/", line 47, in __init__
    assert data['type'] == Index._type, "Expected file type is '%s', not '%s'" % (Index._type, data['type'])
AssertionError: Expected file type is 'index', not 'distribution'

The error is the same if I rename distribution.yaml to foo.yaml.

I guess I could do the alphabetic sorting manually...

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-11-10 17:11:17 -0600

William gravatar image

Make sure your version of python-rosdistro is up-to-date.

edit flag offensive delete link more


Yes, python-rosdistro is up-to-date.

kmhallen gravatar image kmhallen  ( 2016-11-11 08:31:28 -0600 )edit

answered 2019-10-16 02:40:01 -0600

Jari gravatar image

A note to the weary traveler that may find this one day: you need to run this on the index.yaml file at the root of rosdistro, not on the individual distribution.yaml file. Also if your formatting is correct it won't say "file changed but formatting ok" it'll instead say "Skipping identical file". This essentially means you're good. If not it will either fix it and show a diff or throw an error.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools



Asked: 2016-11-10 16:52:59 -0600

Seen: 201 times

Last updated: Oct 16 '19