Skip to content

'ImageDraw' object has no attribute 'textsize' warning with new pillow version 10.0.0 #472

Description

@marc-hb

On July 1st, python library "Pillow" (needed by sphinxcontrib.blockdiag) released version 10.0.0
https://pypi.org/project/Pillow/#history

The sof-docs build immediately started to fail with the warning below.

https://github.com/thesofproject/sof/actions/workflows/daily-tests.yml
https://github.com/thesofproject/sof/actions/runs/5433906267/jobs/9881925923

WARNING: dot code 'blockdiag edf_scheduling {\n\n\tnode_width = 250;\n\tnode_height = 120;\n\tdefault_fontsize = 16;\n\n\tComp_1 -> Comp_2\n\tcomment_1 -> Comp_2 [style=dashed]\n\tComp_2 -> Comp_3\n\tcomment_2 -> Comp_3 [style=dashed]\n\tComp_3 -> Comp_4\n\tcomment_3 -> Comp_4 [style=dashed]\n\tComp_4 -> sink\n\tcomment_4 -> sink [style=dashed]\n\n\tComp_1 [label="DP component 1\n\n\t\tprocessing period\n\n\t\tcompute requirement"]\n\tComp_2 [label="DP component 2\n\n\t\tprocessing period\n\n\t\tcompute requirement"]\n\tComp_3 [label="DP component 3\n\n\t\tprocessing period\n\n\t\tcompute requirement"]\n\tComp_4 [label="DP component 4\n\n\t\tprocessing period\n\n\t\tcompute requirement"]\n\n\tsink [label="real time sink", shape=endpoint, fontsize = 16]\n\n\tcomment_1 [label="DP1 to deliver data let\n\n\t\tDP2 meet its objective"]\n\tcomment_2 [label="DP2 to deliver data let\n\n\t\tDP3 meet its objective"]\n\tcomment_3 [label="DP3 to deliver data let\n\n\t\tDP4 meet its objective"]\n\tcomment_4 [label="DP4 to deliver data\n\n\t\tto real time-sink"]\n}\n': 'ImageDraw' object has no attribute 'textsize'
generating indices... genindex done

Also seen in recent sof-docs PRs:
https://github.com/thesofproject/sof-docs/actions/runs/5461579335/jobs/9939764550

To reproduce:

pip3 install -r scripts/requirements.txt
# override the debian package python3-pil or whatever else
pip3 install pillow==10.0.0

Collecting Pillow==10
  Using cached Pillow-10.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)

# It's just a warning so we need a re-build
make clean
# ... or this shortcut seems to be enough
rm _build/html/architectures/firmware/sof-zephyr/mpp_layer/mpp_scheduling.html
Screenshot 2023-07-10 at 17 01 56

Activity

  1. marc-hb commented on Jul 10, 2023

    @marc-hb
    CollaboratorAuthor

    Tested, incoming workaround:

    pip install 'pillow<10'

  2. marc-hb commented on Jul 12, 2023

    @marc-hb
    CollaboratorAuthor

    There was a deprecation warning but sphinx has been hiding those:

    Apparently we can't do this anymore blockdiag is orphaned and not compatible with Pillow 10 no matter what you do with blockdiag.

    blockdiag edf_scheduling {
    
            node_width = 250;
            node_height = 120;
            ...
    

    This was added by @mwasko in commit 6ec5940.

    @mwasko could you check what is the newer way to do this?

  3. marc-hb commented on Feb 24, 2024

    @marc-hb
    CollaboratorAuthor

    Bad news: blockdiag is orphaned:

    The not-so-bad news: we use blockdiag in a single place for @mwasko's relatively small diagram: 6ec5940

    https://thesofproject.github.io/latest/architectures/firmware/sof-zephyr/mpp_layer/mpp_scheduling.html

    Could this diagram be re-done using something else? plantUML maybe?

    image

  4. lgirdwood commented on Feb 26, 2024

    @lgirdwood
    Member

    @mmaka1 @mwasko any suggestions to replace blockdiag for diagrams ?

  5. marc-hb commented on Apr 15, 2024

    @marc-hb
    CollaboratorAuthor

    More discussion in newer #491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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