Skip to content

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

Open
@qm-intel

Description

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'

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions