-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Current Behaviour
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\wordcloud\wordcloud.py", line 458, in generate_from_frequencies
font_size = int(2 * sizes[0] * sizes[1]
~~~~~^^^
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\wordcloud\wordcloud.py", line 464, in generate_from_frequencies
font_size = sizes[0]
~~~~~^^^
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\code\orion_kdb\EDA\eda_report.py", line 11, in
profile.to_file("knowledge_report.html")
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\ydata_profiling\profile_report.py", line 381, in to_file
data = self.to_html()
^^^^^^^^^^^^^^
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\ydata_profiling\profile_report.py", line 498, in to_html
return self.html
^^^^^^^^^
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\ydata_profiling\profile_report.py", line 294, in html
self._html = self._render_html()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\ydata_profiling\profile_report.py", line 411, in _render_html
report = self.report
^^^^^^^^^^^
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\ydata_profiling\profile_report.py", line 288, in report
self._report = get_report_structure(self.config, self.description_set)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\ydata_profiling\report\structure\report.py", line 388, in get_report_structure
render_variables_section(config, summary),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\ydata_profiling\report\structure\report.py", line 162, in render_variables_section
template_variables.update(render_map_type(config, template_variables))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\ydata_profiling\report\structure\variables\render_text.py", line 81, in render_text
plot_word_cloud(config, summary["word_counts"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\ydata_profiling\visualisation\plot.py", line 133, in plot_word_cloud
_plot_word_cloud(config=config, series=word_counts)
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\ydata_profiling\visualisation\plot.py", line 46, in _plot_word_cloud
).generate_from_frequencies(word_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wyaning\AppData\Local\miniforge3\envs\kdb\Lib\site-packages\wordcloud\wordcloud.py", line 466, in generate_from_frequencies
raise ValueError(
ValueError: Couldn't find space to draw. Either the Canvas size is too small or too much of the image is masked out.
Expected Behaviour
There should be parameters that can set the word cloud, or default parameters
Data Description
Some fields in the data are long text
Code that reproduces the bug
import numpy as np
import pandas as pd
import ydata_profiling
import wordcloud
from ydata_profiling import ProfileReport
print(ydata_profiling.version)
path= r'C:\code\Data Base.csv'
df = pd.read_csv(path)
profile = ProfileReport(df, title="Profiling Report")
profile.to_file("knowledge_report.html")
pandas-profiling version
4.16.1
Dependencies
Package Version
------------------ -----------
annotated-types 0.7.0
attrs 25.3.0
certifi 2025.8.3
charset-normalizer 3.4.3
colorama 0.4.6
contourpy 1.3.3
cycler 0.12.1
dacite 1.9.2
fonttools 4.59.2
htmlmin 0.1.12
idna 3.10
ImageHash 4.3.1
Jinja2 3.1.6
joblib 1.5.2
kiwisolver 1.4.9
llvmlite 0.44.0
MarkupSafe 3.0.2
matplotlib 3.10.0
multimethod 1.12
networkx 3.5
numba 0.61.0
numpy 2.1.3
packaging 25.0
pandas 2.3.2
patsy 1.0.1
phik 0.12.5
pillow 11.3.0
pip 25.2
puremagic 1.30
pydantic 2.11.7
pydantic_core 2.33.2
pyparsing 3.2.3
python-dateutil 2.9.0.post0
pytz 2025.2
PyWavelets 1.9.0
PyYAML 6.0.2
requests 2.32.5
scipy 1.15.3
seaborn 0.13.2
setuptools 80.9.0
six 1.17.0
statsmodels 0.14.5
tqdm 4.67.1
typeguard 4.4.4
typing_extensions 4.15.0
typing-inspection 0.4.1
tzdata 2025.2
urllib3 2.5.0
visions 0.8.1
wheel 0.45.1
wordcloud 1.9.4
ydata-profiling 4.16.1
OS
No response
Checklist
- There is not yet another bug report for this issue in the issue tracker
- The problem is reproducible from this bug report. This guide can help to craft a minimal bug report.
- The issue has not been resolved by the entries listed under Common Issues.