ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ament_copyright --add-missing gives KeyError: 'copyright_holder'

asked 2020-06-01 11:43:34 -0500

clyde gravatar image

I get an error running ament_copyright --add-missing:

$ /opt/ros/eloquent/bin/ament_copyright --add-missing "Clyde McQueen" bsd2
Traceback (most recent call last):
  File "/opt/ros/eloquent/bin/ament_copyright", line 11, in <module>
    load_entry_point('ament-copyright==0.8.1', 'console_scripts', 'ament_copyright')()
  File "/opt/ros/eloquent/lib/python3.6/site-packages/ament_copyright/", line 128, in main
    file_descriptors, name, licenses[args.add_missing[1]], args.verbose)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/ament_copyright/", line 221, in add_missing_header
    header = license_.file_header.format(**{'copyright': copyright_})
KeyError: 'copyright_holder'

I see copyright_holderin the template, but I'm not sure how to set it:

Perhaps this is a little-used feature, so nobody has noticed this bug? Workaround is easy, I'll just copy/paste the headers.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-06-03 17:55:26 -0500

Dirk Thomas gravatar image

While the bug has been fixed for Foxy ( it hasn't been backported yet.

As a temporary workaround you can apply the same patch to your local file ament_copyright/

edit flag offensive delete link more

Question Tools



Asked: 2020-06-01 11:43:34 -0500

Seen: 218 times

Last updated: Jun 03 '20