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

bug: datacite parser can fail when trying to access non-existent tag attributes #33

Open
seasidesparrow opened this issue Nov 16, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@seasidesparrow
Copy link
Member

seasidesparrow commented Nov 16, 2022

Describe the bug
The habanero content_negotiation method can return DataCite records in the kernel-4 xml format. The existing datacite parser will fail at L132 if the <title> tag does not have attributes embedded within the tag. The parser will return an IndexError exception when that happens: IndexError: list index out of range

To Reproduce

  • Obtain the datacite-xml formatted record via habanero.cn.content_negotiation(ids='10.15468/t4rau8', format='datacite-xml', url='https://api.datacite.org')
  • Parse the record with adsingestp.parsers.datacite.parse(xmldata)

Additional context
Add any other context about the problem here.

@seasidesparrow seasidesparrow added the bug Something isn't working label Nov 16, 2022
@seasidesparrow seasidesparrow self-assigned this Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant