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

ValueError: Only supported for TrueType fonts on Databricks #742

Open
rlleshi opened this issue Nov 17, 2023 · 0 comments
Open

ValueError: Only supported for TrueType fonts on Databricks #742

rlleshi opened this issue Nov 17, 2023 · 0 comments

Comments

@rlleshi
Copy link

rlleshi commented Nov 17, 2023

Description

I'm trying to use wordcloud in databricks but am getting this error: ValueError: Only supported for TrueType fonts.

I also tried to upload a font to dbfs and then supply it to the WordCloud constructor accordingly but it still fails with the same error.

Steps/Code to Reproduce

from wordcloud import WordCloud
text = 'trim kulzer wahrsch spotify kenia grace apache zwei null sieben roller spotify madonna lana del rey '
wordcloud = WordCloud(
    scale=10,
    background_color="white", 
    random_state=1,
    colormap="inferno",
).generate(text)

plt.figure(figsize=(10, 5))
plt.imshow(wordcloud, interpolation="bilinear")
plt.axis("off")
plt.show()

Expected Results

Visualized wordcloud.

Actual Results

Error thrown: ValueError: Only supported for TrueType fonts

Versions

Linux-5.15.0-1042-azure-x86_64-with-glibc2.31
Python 3.9.5 (default, Nov 23 2021, 15:27:38) 
[GCC 9.3.0]
NumPy 1.24.4
matplotlib 3.5.1
wordcoud 1.9.2
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

1 participant