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
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
Expected Results
Visualized wordcloud.
Actual Results
Error thrown:
ValueError: Only supported for TrueType fonts
Versions