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
Firstly - this library has saved me so much time. Thanks for all of your hard work!
Today I noticed I was receiving an error when trying to access the abstract property of this specific PubMed article and upon further investigation saw that (unusually) the AbstractText contains formatting tags which seems to break line 16 in medlinecitation.py: return " ".join([at.text for at in self._xml_root.findall('Article/Abstract/AbstractText')])
The issue seems to be fixed by changing the line to the below, which should capture the text of all AbstractText and child elements: return " ".join(["".join(at.itertext()) for at in self._xml_root.findall('Article/Abstract/AbstractText')])
I'm new to open source contribution but would love to make this my first PR!
The text was updated successfully, but these errors were encountered:
Hi @pmartin23 - So sorry for the long delay. I completely missed this comment in eutils. I'm glad the library is useful to you!
I agree with your diagnosis and solution. It would be great to have a PR from you. Please let me know if you need any help in preparing a PR -- see my profile for my email address.
Hey there,
Firstly - this library has saved me so much time. Thanks for all of your hard work!
Today I noticed I was receiving an error when trying to access the abstract property of this specific PubMed article and upon further investigation saw that (unusually) the AbstractText contains formatting tags which seems to break line 16 in medlinecitation.py:
return " ".join([at.text for at in self._xml_root.findall('Article/Abstract/AbstractText')])
The issue seems to be fixed by changing the line to the below, which should capture the text of all AbstractText and child elements:
return " ".join(["".join(at.itertext()) for at in self._xml_root.findall('Article/Abstract/AbstractText')])
I'm new to open source contribution but would love to make this my first PR!
The text was updated successfully, but these errors were encountered: