You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wordcloud fails to run due to (apparently) dependency version misalignment, producing the error below:
AttributeError: 'ImageDraw' object has no attribute 'textbbox'
The problem is mentioned in an SO thread, but no reliable solution was proposed.
Steps/Code to Reproduce
$ wordcloud_cli --text /tmp/simple_test_input.txt --imagefile /tmp/out.png
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.15) or chardet (3.0.4) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
File "/home/t/.local/bin/wordcloud_cli", line 8, in <module>
sys.exit(main())
File "/home/t/.local/lib/python3.8/site-packages/wordcloud/__main__.py", line 33, in main
wordcloud_cli_main(*wordcloud_cli_parse_args(sys.argv[1:]))
File "/home/t/.local/lib/python3.8/site-packages/wordcloud/wordcloud_cli.py", line 90, in main
wordcloud.generate(text)
File "/home/t/.local/lib/python3.8/site-packages/wordcloud/wordcloud.py", line 642, in generate
return self.generate_from_text(text)
File "/home/t/.local/lib/python3.8/site-packages/wordcloud/wordcloud.py", line 624, in generate_from_text
self.generate_from_frequencies(words)
File "/home/t/.local/lib/python3.8/site-packages/wordcloud/wordcloud.py", line 453, in generate_from_frequencies
self.generate_from_frequencies(dict(frequencies[:2]),
File "/home/t/.local/lib/python3.8/site-packages/wordcloud/wordcloud.py", line 511, in generate_from_frequencies
box_size = draw.textbbox((0, 0), word, font=transposed_font, anchor="lt")
AttributeError: 'ImageDraw' object has no attribute 'textbbox'
$
Expected Results
wordcloud runs without any CLI output and produces a PNG with a wordcloud.
Actual Results
See above. Repeatability is 100% out of several attempts on 2 separate machines, both running Ubuntu 20.04.
After that, works as expected. Also stumbled onto a comment saying that it's known that the latest version doesn't run on python 3.6 (and apparently later). Leaving this here for anyone who stumbles upon the same issue, FWIW.
Description
wordcloud fails to run due to (apparently) dependency version misalignment, producing the error below:
AttributeError: 'ImageDraw' object has no attribute 'textbbox'
The problem is mentioned in an SO thread, but no reliable solution was proposed.
Steps/Code to Reproduce
Expected Results
wordcloud runs without any CLI output and produces a PNG with a wordcloud.
Actual Results
See above. Repeatability is 100% out of several attempts on 2 separate machines, both running Ubuntu 20.04.
Versions
The text was updated successfully, but these errors were encountered: