Skip to content
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

Errors if entry title is missing #2

Closed
msschwartz21 opened this issue May 18, 2020 · 1 comment
Closed

Errors if entry title is missing #2

msschwartz21 opened this issue May 18, 2020 · 1 comment

Comments

@msschwartz21
Copy link

When I tried to run biblint on a file where many entries were missing titles, it threw an error instead of flagging the missing titles as an issue.

Traceback (most recent call last):
  File "biblint", line 127, in <module>
    for complaint in checker.check_all():
  File "/Users/morganschwartz/Code/biblint/BibLintChecks.py", line 294, in check_all
    indices_by_title = BibliographyTools.get_indices_by_title(self.bibliography)
  File "/Users/morganschwartz/Code/biblint/Tools.py", line 86, in get_indices_by_title
    title = BibEntryTools.readable_title(entry)
  File "/Users/morganschwartz/Code/biblint/Tools.py", line 75, in readable_title
    title = bibentry.rawtext("title")
  File "/Users/morganschwartz/Code/biblint/BibEntry.py", line 158, in rawtext
    return "".join(field.text for field in self.parsefield(fieldname))
  File "/Users/morganschwartz/Code/biblint/BibEntry.py", line 154, in parsefield
    parsedtext = self.parsetext(self[fieldname])
  File "/Users/morganschwartz/Code/biblint/BibEntry.py", line 216, in __getitem__
    return self._properties[key]
KeyError: 'title'
@johndoe31415
Copy link
Owner

Yeah, that shouldn't happen... let me fix this one tonight as well, good catch.

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

No branches or pull requests

2 participants