adsabs / ADSIngestParser

Curation parser library
MIT License
0 stars 7 forks source link

JATS parser can fail if <aff> tag has an embedded <ext-link> without an "id" attribute #51

Closed seasidesparrow closed 1 year ago

seasidesparrow commented 1 year ago

Describe the bug L339 of adsingestp/parsers/jats.py expects that any ext-link tag will have an id attribute, and this is not generally true for ext-link-type other than "email". For example, ext-link-type="uri" doesn't necessarily have an id. If there is no id attribute, L339 will throw an uncaught exception.

To Reproduce Try to parse the file ".../abstracts/data/IOPP/2021-12-10/0004-637X/0004-637X_923/0004-637X_923_1/0004-637X_923_1_47/apj_923_1_47.xml". This will raise an uncaught exception.

Additional context Add any other context about the problem here.