Skip to content

【Bug】AttributeError: 'NoneType' object has no attribute 'group' #14

@zakinp

Description

@zakinp

对随机不同的pdf进行识别测试时出现了以下问题:

D:\ChatPaper2Xmind> python .\paper2xmind.py --path "D:\pdftest\"
D:\pdftest\PhysRevX.8.031079.pdf
Traceback (most recent call last):
  File "D:\ChatPaper2Xmind\paper2xmind.py", line 54, in <module>
    pdf_batch_processing(argparser.parse_args().path)
  File "D:\ChatPaper2Xmind\paper2xmind.py", line 36, in pdf_batch_processing
    pdf_processing(pdf_path, xmind_path)
  File "D:\ChatPaper2Xmind\paper2xmind.py", line 15, in pdf_processing
    paper = PDFPaperParser(pdf_file_path)
  File "D:\ChatPaper2Xmind\pdf_parser.py", line 23, in __init__
    self.section_textdict = self.get_section_textdict()
  File "D:\ChatPaper2Xmind\pdf_parser.py", line 182, in get_section_textdict
    section_title = self.get_section_titles(withlevel=False)
  File "D:\ChatPaper2Xmind\pdf_parser.py", line 158, in get_section_titles
    section_title = [(re.search(ABS_MATCHSTR, self.all_text).group(), 1)]\
AttributeError: 'NoneType' object has no attribute 'group'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions