Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marc-hb opened this issue Jul 10, 2023 · 6 comments
Assignees

Comments

@marc-hb
Copy link
Collaborator

marc-hb commented Jul 10, 2023

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
@marc-hb
Copy link
Collaborator Author

marc-hb commented Jul 10, 2023

Tested, incoming workaround:

pip install 'pillow<10'

marc-hb added a commit to marc-hb/sof-docs that referenced this issue Jul 10, 2023
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
"'ImageDraw' object has no attribute 'textsize'"

Stick to pillow<10 for now to avoid the warning.

More details in issue
thesofproject#472

Signed-off-by: Marc Herbert <[email protected]>
lgirdwood pushed a commit that referenced this issue Jul 11, 2023
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
"'ImageDraw' object has no attribute 'textsize'"

Stick to pillow<10 for now to avoid the warning.

More details in issue
#472

Signed-off-by: Marc Herbert <[email protected]>
@marc-hb marc-hb closed this as completed Jul 11, 2023
@marc-hb
Copy link
Collaborator Author

marc-hb commented Jul 12, 2023

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?

@marc-hb
Copy link
Collaborator Author

marc-hb commented Feb 24, 2024

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

marc-hb added a commit to marc-hb/sof-docs that referenced this issue Feb 24, 2024
marc-hb added a commit to marc-hb/sof-docs that referenced this issue Feb 24, 2024
@lgirdwood
Copy link
Member

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

@marc-hb
Copy link
Collaborator Author

marc-hb commented Apr 15, 2024

More discussion in newer #491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants