Skip to content

docutils: triggers PIL TypeError #9966

Description

@kiefernforst

Dear devs,

I'm getting a nasty Pillow error in 3bac017

My last build has been from February 2026 and did not contain this error:

  File "/usr/lib/python3.10/site-packages/docutils/writers/html4css1/__init__.py", line 23, in <module>
    from docutils.writers import _html_base
  File "/usr/lib/python3.10/site-packages/docutils/writers/_html_base.py", line 35, in <module>
    from docutils.parsers.rst.directives.images import PIL
  File "/usr/lib/python3.10/site-packages/docutils/parsers/rst/directives/images.py", line 14, in <module>
    import PIL.Image
  File "/usr/lib/python3.10/site-packages/PIL/Image.py", line 48, in <module>
    from . import (
  File "/usr/lib/python3.10/site-packages/PIL/TiffTags.py", line 462, in <module>
    _populate()
  File "/usr/lib/python3.10/site-packages/PIL/TiffTags.py", line 456, in _populate
    TAGS_V2[k] = TagInfo(k, *v)
  File "/usr/lib/python3.10/site-packages/PIL/TiffTags.py", line 47, in __new__
    return super().__new__(cls, value, name, type, length, enum or {})
TypeError: _TagInfo.__new__() takes 1 positional argument but 6 were given

the following commands don't run due to the TypeError on import:

python3 -m PIL.report
or
python3 -m PIL --report

from PIL import report

from PIL import features
features.pilinfo(supported_formats=False)

@hugovk May your typing db8e579 possible have broken it?

I've downgraded TiffTags.py to the last untyped version 43b2f61 to allow docutils to work again.

Activity

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