You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Parsing the JATS file /proj/ads/abstracts/data/IOPP/2024-11-19/0004-637X/0004-637X_976/0004-637X_976_1/0004-637X_976_1_119/apj_976_1_119.xml yields an exception because of a <sc/> tag in the abstract. base.py applies a modification to anything tagged as small caps by using .upper(), but in the case of an empty tag, it is trying to apply upper case to NoneType.
To Reproduce
Steps to reproduce the behavior:
Additional context
This can be fixed by checking for the existence of e.string in base.py L592, and only then apply .upper() if e.string is not None.
The text was updated successfully, but these errors were encountered:
modified: adsingestp/parsers/base.py
new file: tests/stubdata/input/jats_empty_smallcaps_tag_apj_976_1_119.xml
new file: tests/stubdata/output/jats_empty_smallcaps_tag_apj_976_1_119.json
modified: tests/test_jats.py
Describe the bug
Parsing the JATS file
/proj/ads/abstracts/data/IOPP/2024-11-19/0004-637X/0004-637X_976/0004-637X_976_1/0004-637X_976_1_119/apj_976_1_119.xml
yields an exception because of a<sc/>
tag in the abstract. base.py applies a modification to anything tagged as small caps by using.upper()
, but in the case of an empty tag, it is trying to apply upper case to NoneType.To Reproduce
Steps to reproduce the behavior:
Additional context
This can be fixed by checking for the existence of e.string in
base.py
L592, and only then apply.upper()
ife.string
is notNone
.The text was updated successfully, but these errors were encountered: