Skip to content

7.8.0-simd-avx2 fails to start: AttributeError: module 'PIL.ImageCms' has no attribute 'Flags'. Did you mean: 'flag'? #174

Description

@tchollingsworth

The recent update to 7.8.0-simd-avx2 fails to start:

---> Starting thumbor with 4 processes...
Traceback (most recent call last):
  File "/usr/local/bin/thumbor", line 5, in <module>
    from thumbor.server import main
  File "/usr/local/lib/python3.11/site-packages/thumbor/server.py", line 26, in <module>
    from thumbor.console import get_server_parameters
  File "/usr/local/lib/python3.11/site-packages/thumbor/console.py", line 13, in <module>
    from thumbor.context import ServerParameters
  File "/usr/local/lib/python3.11/site-packages/thumbor/context.py", line 13, in <module>
    from thumbor.metrics.logger_metrics import Metrics
  File "/usr/local/lib/python3.11/site-packages/thumbor/metrics/logger_metrics.py", line 11, in <module>
    from thumbor.utils import logger
  File "/usr/local/lib/python3.11/site-packages/thumbor/utils.py", line 37, in <module>
    _FLAGS = getattr(ImageCms, "FLAGS", ImageCms.Flags)
                                        ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PIL/ImageCms.py", line 128, in __getattr__
    raise AttributeError(msg)
AttributeError: module 'PIL.ImageCms' has no attribute 'Flags'. Did you mean: 'flag'?
docker-compose.yml
services:
  thumbor:
    image: ghcr.io/minimalcompact/thumbor:latest-simd-avx2
    env_file: thumbor.env
    volumes:
      - thumbor-data:/data
    restart: unless-stopped
thumbor.env
# VIRTUAL_HOST is picked up by nginx-proxy. Here it's set for localhost
# but you usually need to point it to your domain, e.g. thumbor.example.com
VIRTUAL_HOST=subdomain.example.com
# THUMBOR_NUM_PROCESSES control how many processes run inside the container
# Normally this is set in connection with the number of CPU cores
# Note however that you can also use the docker-compose scale option to dynamically
# scale your thumbor instances
THUMBOR_NUM_PROCESSES=4
# this would allow CORS from any origin (you can restrict to specific origins if you want)
CORS_ALLOW_ORIGIN=*
# returns a webp image if browser Accept headers match
AUTO_WEBP=True
# nginx-proxy does caching automatically, so no need to store the result storage cache
# (this greatly speeds up and saves on CPU)
RESULT_STORAGE=thumbor.result_storages.no_storage
# RESULT_STORAGE_STORES_UNSAFE=True
# STORAGE=thumbor.storages.file_storage

SECURITY_KEY=some_s3cret
ALLOW_UNSAFE_URL=False

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions