AutoViz: ValueError: ClassSelector parameter None value must be an instance of (function, tuple), not .
When running the sample, on Python 3.10.9, it throws an exception as bellow:
import pandas as pd
from autoviz import AutoViz_Class
AV = AutoViz_Class()
data = {'col1': [1, 2, 3, 4, 5], 'col2': [5, 4, 3, 2, 1]}
df = pd.DataFrame(data)
dft = AV.AutoViz(
"",
sep=",",
depVar="",
dfte=df,
header=0,
verbose=1,
lowess=False,
chart_format="server",
max_rows_analyzed=150000,
max_cols_analyzed=30,
save_plot_dir=None
)
ValueError: ClassSelector parameter None value must be an instance of (function, tuple), not <function size at 0x103f249b0>.
The full exception message is:
Exception has occurred: ValueError (note: full exception trace is shown but execution is paused at: _run_module_as_main)
ClassSelector parameter None value must be an instance of (function, tuple), not <function size at 0x1044d3570>.
File "/...................................................../.venv/lib/python3.10/site-packages/param/__init__.py", line 1383, in _validate_class_
raise ValueError(
File "/...................................................../.venv/lib/python3.10/site-packages/param/__init__.py", line 1371, in _validate
self._validate_class_(val, self.class_, self.is_instance)
File "/...................................................../.venv/lib/python3.10/site-packages/param/__init__.py", line 1367, in __init__
self._validate(default)
File "/...................................................../.venv/lib/python3.10/site-packages/holoviews/plotting/bokeh/hex_tiles.py", line 30, in hex_binning
aggregator = param.ClassSelector(
File "/...................................................../.venv/lib/python3.10/site-packages/holoviews/plotting/bokeh/hex_tiles.py", line 22, in <module>
class hex_binning(Operation):
File "/...................................................../.venv/lib/python3.10/site-packages/holoviews/plotting/bokeh/__init__.py", line 40, in <module>
from .hex_tiles import HexTilesPlot
File "/...................................................../.venv/lib/python3.10/site-packages/hvplot/converter.py", line 25, in <module>
from holoviews.plotting.bokeh import OverlayPlot, colormap_generator
File "/...................................................../.venv/lib/python3.10/site-packages/hvplot/__init__.py", line 12, in <module>
from .converter import HoloViewsConverter
File "/...................................................../.venv/lib/python3.10/site-packages/autoviz/AutoViz_Utils.py", line 61, in <module>
import hvplot.pandas
File "/...................................................../.venv/lib/python3.10/site-packages/autoviz/AutoViz_Holo.py", line 5, in <module>
from autoviz.AutoViz_Utils import *
File "/...................................................../.venv/lib/python3.10/site-packages/autoviz/AutoViz_Class.py", line 61, in <module>
from autoviz.AutoViz_Holo import AutoViz_Holo
File "/...................................................../.venv/lib/python3.10/site-packages/autoviz/__init__.py", line 3, in <module>
from .AutoViz_Class import AutoViz_Class
File "/...................................................../x.py", line 1, in <module>
from autoviz import AutoViz_Class
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main (Current frame)
return _run_code(code, main_globals, None,
ValueError: ClassSelector parameter None value must be an instance of (function, tuple), not <function size at 0x1044d3570>.
About this issue
- Original URL
- State: open
- Created 7 months ago
- Comments: 17 (7 by maintainers)
Support for Python 3.11 was fixed in https://github.com/holoviz/holoviews/pull/5513 and released in HoloViews 1.15.3 https://holoviews.org/releases.html#version-1-15-3.
Hi all, I’m writing with respect to https://github.com/holoviz/hvplot/issues/1239. This issue was fixed in https://github.com/holoviz/holoviews/pull/5636 and released in HoloViews 1.16.0. It turns out this was all due to a change in Numpy itself, see https://github.com/numpy/numpy/issues/23307.
AutoViz is pinning hvPlot and HoloViews to older versions but has no pin on Numpy: https://github.com/AutoViML/AutoViz/blob/ba75e534388317aefcc91ad7eca6e4202d9936fc/setup.py#L30-L32
In my opinion your solutions include:
As far as hvPlot is concerned, there isn’t much we can do. In an ideal world we could backport this kind of bug fixes to older versions, but we really don’t have the bandwith to do so, i.e. packages dependents on HoloViews have to use the latest version to benefit from the bug fixes.
@AutoViML I have created an issue #1239 in the hvplot repository. From reading another issue #1187, it seems to do with the use of older versions of hvplot, holoviews and bokeh.
I’ll update any comments from those issues here for your action if it helps.