Ask Your Question
0

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/main.py", 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/main.py", 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: https://github.com/ament/ament_lint/b...

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
1

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

Dirk Thomas gravatar image

While the bug has been fixed for Foxy (https://github.com/ament/ament_lint/p...) it hasn't been backported yet.

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

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

2 followers

Stats

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

Seen: 19 times

Last updated: Jun 03