Pillow 10.0 removed the Image.ANTIALIAS constant and restructured the transform API. WeasyPrint versions before 53.0 call internal Pillow methods that no longer exist in Pillow 10+, causing AttributeError at render time.
WeasyPrint 53.0 updated its Pillow integration to be compatible with Pillow 10+. Upgrade both packages together.
pip install --upgrade weasyprint pillow
If upgrading WeasyPrint is not immediately possible, pin Pillow to the last 9.x release. Pillow 9.x is no longer receiving security updates — migrate as soon as practical.
pip install "pillow<10.0"