Skip to content

`"Page" has no attribute "find_tables" in PyMuPDF 1.27 #4932

Closed

Description

@jamesbraza

Description of the bug

Upgrading from PyMuPDF 1.26.7 to 1.27.2 (since #4862 and #4869 added a py.typed), the find_tables monkeypatch is not working with mypy: https://github.com/pymupdf/PyMuPDF/blob/1.27.2/src/__init__.py#L25574-L25575

How to reproduce the bug

Upgrading from PyMuPDF 1.26.7 to 1.27.2, with the below script using Python 3.13:

import pymupdf

page: pymupdf.Page
page.find_tables()

I now see this attr-defined error with mypy==1.19.1:

a.py:4:1: error: "Page" has no
  attribute "find_tables"  [attr-defined]
      page.find_tables()
      ^~~~~~~~~~~~~~~~

PyMuPDF version

1.27.2

Operating system

MacOS

Python version

3.13

Activity

  1. julian-smith-artifex-com commented on Mar 11, 2026

    @julian-smith-artifex-com
    Collaborator

    I have a fix in my tree.

  2. added 2 commits that reference this issue on Mar 11, 2026
    6aeb659
    64bf8a0
  3. julian-smith-artifex-com commented on Mar 20, 2026

    @julian-smith-artifex-com
    Collaborator

    Fixed in pymupdf-1.27.2.2.

  4. jamesbraza commented on Mar 20, 2026

    @jamesbraza
    Author

    Thanks Julian. For posterity, this was the fix: 64bf8a0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions