Sphinx raises 'ImageDraw' object has no attribute 'textsize' error

Bug #2026345 reported by Kenta Fukaya
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Low
Michael Johnson
Ironic
New
Undecided
Unassigned
OpenStack Compute (nova)
Confirmed
Low
Unassigned
OpenStack Identity (keystone)
New
Undecided
Unassigned
octavia
In Progress
Low
Gregory Thiemonge
tacker
Fix Released
Undecided
Unassigned

Bug Description

Pillow version 10.0 or higher sphinx raises error.

'''
 'ImageDraw' object has no attribute 'textsize'
'''

Tacker specs use sphinx and pillow to build some diagrams in .rst file.
Pillow remove ImageDraw.textsize() form version 10.0[1],
but sphinx use ImageDraw.textsize().

[1] https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#font-size-and-offset-methods

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I'm also hitting this with at least designate, nova, and keystone when building packages for ubuntu for bobcat (on ubuntu mantic). I see upper-constraints is pinned at 9.5.0 currently so that explains why it's not hit upstream yet.

Revision history for this message
Corey Bryant (corey.bryant) wrote :
Revision history for this message
Michael Johnson (johnsom) wrote :

FYI, I posted a PR for this back in February here: https://github.com/blockdiag/blockdiag/pull/171

Revision history for this message
Kenta Fukaya (fukayan) wrote :

Tacker solved this problem by using Pillow version 9.5.
https://review.opendev.org/c/openstack/tacker-specs/+/887772.

Thanks for sharing so much information.

Revision history for this message
Elod Illes (elod-illes) wrote :

Corey is right. In most cases this issue won't come until the upper constraints of Pillow / Sphinx is not bumped [1] in openstack/requirements repository. Nevertheless, the problem exists and will need a fix / workaround (better than pinning? best would be with the above linked PR?) in the future.

[1] reproduced in openstack/nova with bumping the constrained versions to recent versions in upper-constraints.txt:

< Pillow===10.0.0
---
> Pillow===9.5.0
299c299
< docutils===0.20.1
---
> docutils===0.17.1
407c407
< Sphinx===7.1.2
---
> Sphinx===4.5.0

Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :
summary: - Shpinx raise 'ImageDraw' object has no attribute 'textsize' error.
+ Sphinx raises 'ImageDraw' object has no attribute 'textsize' error
Changed in designate:
status: New → Fix Released
importance: Undecided → Low
Changed in designate:
assignee: nobody → Michael Johnson (johnsom)
Changed in octavia:
assignee: nobody → Gregory Thiemonge (gthiemonge)
importance: Undecided → Low
status: New → Confirmed
Changed in octavia:
status: Confirmed → In Progress
Revision history for this message
Amit Uniyal (auniyal) wrote :
Kenta Fukaya (fukayan)
Changed in tacker:
status: New → Fix Released
Revision history for this message
Riccardo Pittau (rpittau) wrote :

I proposed a revert to Pillow 9.5.0 in upper constraints until we can found an alternative to render sequence diagrams
A valid tool could be PlantUML https://plantuml.com/ that uses graphviz

https://review.opendev.org/c/openstack/requirements/+/897537

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to octavia (master)

Reviewed: https://review.opendev.org/c/openstack/octavia/+/897519
Committed: https://opendev.org/openstack/octavia/commit/c4a162ab40023884d33ecb3cfe3f47801d6023bc
Submitter: "Zuul (22348)"
Branch: master

commit c4a162ab40023884d33ecb3cfe3f47801d6023bc
Author: Gregory Thiemonge <email address hidden>
Date: Fri Oct 6 09:12:17 2023 +0200

    Disable seqdiag in the spec docs

    The tls-data-security specs use seqdiag to describe communication between
    some components.
    seqdiag is unmaintained and doesn't work with recent Pillow releases (10.0.1).
    Disable the generation of those diagrams as they are part of old specs.

    Also remove the dependency on seqdiag

    Disable octavia-grenade-skip-level which will be fixed in another commit

    Partial-Bug: #2026345

    Change-Id: I6b5c5d6c651dac223a205409c49085faf78cff15

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.