Skip to content

AttributeError: module 'PIL._imaging' has no attribute 'libtiff_support_custom_tags' #7019

@Lucas-C

Description

@Lucas-C

What did you do?

from io import BytesIO
from PIL import Image
img = Image.open("basi0g01.png")
img.save(BytesIO(), format="TIFF", compression="group4")

Image file basi0g01.png: basi0g01

What did you expect to happen?

No error raised

What actually happened?

Traceback (most recent call last):
  File "./pil_bug.py", line 14, in <module>
    img.save(BytesIO(), format="TIFF", compression="group4")
  File "/home/lucas_cimon/.local/share/virtualenvs/fpdf2/lib/python3.8/site-packages/PIL/Image.py", line 2435, in save
    save_handler(self, fp, filename)
  File "/home/lucas_cimon/.local/share/virtualenvs/fpdf2/lib/python3.8/site-packages/PIL/TiffImagePlugin.py", line 1810, in _save
    if not Image.core.libtiff_support_custom_tags:
AttributeError: module 'PIL._imaging' has no attribute 'libtiff_support_custom_tags'

What are your OS, Python and Pillow versions?

  • OS: WSL (Ubuntu 20.04)
  • Python: 3.8.10
  • Pillow: 64f2924

Note: I think this issue can be tagged with TIFF & Bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAny unexpected behavior, until confirmed feature.TIFF

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions