Skip to content

KeyError 'filename' when two issues indicated #381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jaraco opened this issue Oct 29, 2020 · 1 comment
Closed

KeyError 'filename' when two issues indicated #381

jaraco opened this issue Oct 29, 2020 · 1 comment

Comments

@jaraco
Copy link
Member

jaraco commented Oct 29, 2020

I was using blurb on a PR that affects two issues (python/cpython#23010) and attempted to create a blurb for it with the tool, adding two bpos to the issue. When I did, it tried to fail with a nice error message but instead failed with a KeyError:

cpython bugfix/bpo-42163 $ blurb add
Traceback (most recent call last):
  File "/Users/jaraco/.local/bin/blurb", line 8, in <module>
    sys.exit(main())
  File "/Users/jaraco/.local/pipx/venvs/blurb/lib/python3.9/site-packages/blurb.py", line 1651, in main
    sys.exit(fn(*filtered_args, **kwargs))
  File "/Users/jaraco/.local/pipx/venvs/blurb/lib/python3.9/site-packages/blurb.py", line 954, in add
    blurb.load(tmp_path)
  File "/Users/jaraco/.local/pipx/venvs/blurb/lib/python3.9/site-packages/blurb.py", line 553, in load
    self.parse(text, metadata=metadata, filename=filename)
  File "/Users/jaraco/.local/pipx/venvs/blurb/lib/python3.9/site-packages/blurb.py", line 531, in parse
    throw("Blurb metadata sets " + repr(name) + " twice!")
  File "/Users/jaraco/.local/pipx/venvs/blurb/lib/python3.9/site-packages/blurb.py", line 486, in throw
    raise BlurbError(f("Error in {filename}:{line_number}:\n{s}"))
  File "/Users/jaraco/.local/pipx/venvs/blurb/lib/python3.9/site-packages/blurb.py", line 138, in f
    return s.format_map(d)
KeyError: 'filename'
@jaraco
Copy link
Member Author

jaraco commented Oct 29, 2020

This is a dupe of #299.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant