Skip to content

Open PDF error segmentation fault #4533

@abcCL

Description

@abcCL

Description of the bug

scripts that use PyMuPDF now cause an error "segmentation fault" when run in the console. After that, there is a system error dialog showing that the Python interpreter has crashed. use pdfplumber can open it.

Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)

How to reproduce the bug

def get_pdf(path:str):
    try:
        # with pdfplumber.open(path) as pdf:
        #     first_page = pdf.pages[0].to_image(resolution=150)
        #     print(first_page.chars[0])
        with fitz.open(os.path.join(path)) as doc:
            num_pages = len(doc)
            print(f'pages: {num_pages}')
    except Exception as e:
        print(e)

PyMuPDF version

1.26.0

Operating system

MacOS

Python version

3.10

this is the file
NineData_user_manual_V3.0.5.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions