Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

AttributeError: 'NoneType' object has no attribute 'getchildren' #151

Open
qm-intel opened this issue Aug 11, 2024 · 1 comment
Open

AttributeError: 'NoneType' object has no attribute 'getchildren' #151

qm-intel opened this issue Aug 11, 2024 · 1 comment
Labels

Comments

@qm-intel
Copy link

qm-intel commented Aug 11, 2024

What is the reason for causing this error?

Traceback (most recent call last):
  File "/home/user/myproject/1-parse-xml-image-caption-inline.py", line 137, in <module>
    caption_dict = pp.parse_pubmed_caption(xml_file_path)  # dict_keys(['pmid', 'pmc', 'fig_caption', 'fig_id', 'fig_label', 'graphic_ref'])
  File "/home/user/anaconda3/envs/medline/lib/python3.10/site-packages/pubmed_parser/pubmed_oa_parser.py", line 428, in parse_pubmed_caption
    fig_captions = fig.find("caption").getchildren()
AttributeError: 'NoneType' object has no attribute 'getchildren'
@qm-intel qm-intel added the bug label Aug 11, 2024
@Michael-E-Rose
Copy link
Collaborator

Can you please give the relevant code that leads you to experience this error?

The traceback alone isn't sufficient.

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

No branches or pull requests

2 participants