Import error
thewchan opened this issue · 11 comments
thewchan commented
Clean install via a new virtual environment (win64), when from autoviz import AutoViz_Class
, the following error occurs:
ValueError: ClassSelector parameter None value must be an instance of (function, tuple), not <function size at 0x7f48bcec06b0>.
The entire stack trace is long see below:
thewchan commented
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from autoviz import AutoViz_Class
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\autoviz\__init__.py:3
1 name = "autoviz"
2 from .__version__ import __version__, __holo_version__
----> 3 from .AutoViz_Class import AutoViz_Class
4 from .AutoViz_Class import data_cleaning_suggestions
5 from .AutoViz_Class import FixDQ
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\autoviz\AutoViz_Class.py:61
59 from sklearn.model_selection import train_test_split
60 ##########################################################################################
---> 61 from autoviz.AutoViz_Holo import AutoViz_Holo
62 from autoviz.AutoViz_Utils import save_image_data, save_html_data, analyze_problem_type, draw_pivot_tables, draw_scatters
63 from autoviz.AutoViz_Utils import draw_pair_scatters, plot_fast_average_num_by_cat, draw_barplots, draw_heatmap
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\autoviz\AutoViz_Holo.py:5
3 import pandas as pd
4 ############# Import from autoviz.AutoViz_Class the following libraries #######
----> 5 from autoviz.AutoViz_Utils import *
6 ############## make sure you use: conda install -c pyviz hvplot ###############
7 import hvplot.pandas # noqa
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\autoviz\AutoViz_Utils.py:61
59 from sklearn.model_selection import train_test_split
60 ######## This is where we import HoloViews related libraries #########
---> 61 import hvplot.pandas
62 import holoviews as hv
63 from holoviews import opts
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\hvplot\__init__.py:12
8 import holoviews as _hv
10 from holoviews import Store
---> 12 from .converter import HoloViewsConverter
13 from .util import get_ipy
14 from .utilities import save, show # noqa
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\hvplot\converter.py:25
18 from holoviews.core.util import max_range, basestring
19 from holoviews.element import (
20 Curve, Scatter, Area, Bars, BoxWhisker, Dataset, Distribution,
21 Table, HeatMap, Image, HexTiles, QuadMesh, Bivariate, Histogram,
22 Violin, Contours, Polygons, Points, Path, Labels, RGB, ErrorBars,
23 VectorField, Rectangles, Segments
24 )
---> 25 from holoviews.plotting.bokeh import OverlayPlot, colormap_generator
26 from holoviews.plotting.util import process_cmap
27 from holoviews.operation import histogram
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\holoviews\plotting\bokeh\__init__.py:40
38 from .graphs import GraphPlot, NodePlot, TriMeshPlot, ChordPlot
39 from .heatmap import HeatMapPlot, RadialHeatMapPlot
---> 40 from .hex_tiles import HexTilesPlot
41 from .path import PathPlot, PolygonPlot, ContourPlot
42 from .plot import GridPlot, LayoutPlot, AdjointLayoutPlot
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\holoviews\plotting\bokeh\hex_tiles.py:22
18 from .selection import BokehOverlaySelectionDisplay
19 from .styles import base_properties, line_properties, fill_properties
---> 22 class hex_binning(Operation):
23 """
24 Applies hex binning by computing aggregates on a hexagonal grid.
25
26 Should not be user facing as the returned element is not directly
27 useable.
28 """
30 aggregator = param.ClassSelector(
31 default=np.size, class_=(types.FunctionType, tuple), doc="""
32 Aggregation function or dimension transform used to compute bin
33 values. Defaults to np.size to count the number of values
34 in each bin.""")
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\holoviews\plotting\bokeh\hex_tiles.py:30, in hex_binning()
22 class hex_binning(Operation):
23 """
24 Applies hex binning by computing aggregates on a hexagonal grid.
25
26 Should not be user facing as the returned element is not directly
27 useable.
28 """
---> 30 aggregator = param.ClassSelector(
31 default=np.size, class_=(types.FunctionType, tuple), doc="""
32 Aggregation function or dimension transform used to compute bin
33 values. Defaults to np.size to count the number of values
34 in each bin.""")
36 gridsize = param.ClassSelector(default=50, class_=(int, tuple))
38 invert_axes = param.Boolean(default=False)
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\param\__init__.py:1367, in ClassSelector.__init__(self, class_, default, instantiate, is_instance, **params)
1365 self.is_instance = is_instance
1366 super(ClassSelector,self).__init__(default=default,instantiate=instantiate,**params)
-> 1367 self._validate(default)
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\param\__init__.py:1371, in ClassSelector._validate(self, val)
1369 def _validate(self, val):
1370 super(ClassSelector, self)._validate(val)
-> 1371 self._validate_class_(val, self.class_, self.is_instance)
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\param\__init__.py:1383, in ClassSelector._validate_class_(self, val, class_, is_instance)
1381 if is_instance:
1382 if not (isinstance(val, class_)):
-> 1383 raise ValueError(
1384 "%s parameter %r value must be an instance of %s, not %r." %
1385 (param_cls, self.name, class_name, val))
1386 else:
1387 if not (issubclass(val, class_)):
ValueError: ClassSelector parameter None value must be an instance of (function, tuple), not <function size at 0x000001948F4DD3F0>.
AutoViML commented
This is a version mismatch in your local machine between holoviews and others. Can you please ensure that you have the following exact versions as mentioned in requirements.txt?
```
| bokeh~=2.4.2 |
|
| hvplot~=0.7.3 |
|
panel>=0.12.6
| holoviews~=1.14.9 |
|
```
Once you have installed each step, just re-import autoviz and see if it fixes it.
ThanksAuto Vimal
On Sunday, July 2, 2023 at 02:50:35 PM EDT, Matt Chan ***@***.***> wrote:
…---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from autoviz import AutoViz_Class
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\autoviz\__init__.py:3
1 name = "autoviz"
2 from .__version__ import __version__, __holo_version__
----> 3 from .AutoViz_Class import AutoViz_Class
4 from .AutoViz_Class import data_cleaning_suggestions
5 from .AutoViz_Class import FixDQ
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\autoviz\AutoViz_Class.py:61
59 from sklearn.model_selection import train_test_split
60 ##########################################################################################
---> 61 from autoviz.AutoViz_Holo import AutoViz_Holo
62 from autoviz.AutoViz_Utils import save_image_data, save_html_data, analyze_problem_type, draw_pivot_tables, draw_scatters
63 from autoviz.AutoViz_Utils import draw_pair_scatters, plot_fast_average_num_by_cat, draw_barplots, draw_heatmap
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\autoviz\AutoViz_Holo.py:5
3 import pandas as pd
4 ############# Import from autoviz.AutoViz_Class the following libraries #######
----> 5 from autoviz.AutoViz_Utils import *
6 ############## make sure you use: conda install -c pyviz hvplot ###############
7 import hvplot.pandas # noqa
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\autoviz\AutoViz_Utils.py:61
59 from sklearn.model_selection import train_test_split
60 ######## This is where we import HoloViews related libraries #########
---> 61 import hvplot.pandas
62 import holoviews as hv
63 from holoviews import opts
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\hvplot\__init__.py:12
8 import holoviews as _hv
10 from holoviews import Store
---> 12 from .converter import HoloViewsConverter
13 from .util import get_ipy
14 from .utilities import save, show # noqa
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\hvplot\converter.py:25
18 from holoviews.core.util import max_range, basestring
19 from holoviews.element import (
20 Curve, Scatter, Area, Bars, BoxWhisker, Dataset, Distribution,
21 Table, HeatMap, Image, HexTiles, QuadMesh, Bivariate, Histogram,
22 Violin, Contours, Polygons, Points, Path, Labels, RGB, ErrorBars,
23 VectorField, Rectangles, Segments
24 )
---> 25 from holoviews.plotting.bokeh import OverlayPlot, colormap_generator
26 from holoviews.plotting.util import process_cmap
27 from holoviews.operation import histogram
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\holoviews\plotting\bokeh\__init__.py:40
38 from .graphs import GraphPlot, NodePlot, TriMeshPlot, ChordPlot
39 from .heatmap import HeatMapPlot, RadialHeatMapPlot
---> 40 from .hex_tiles import HexTilesPlot
41 from .path import PathPlot, PolygonPlot, ContourPlot
42 from .plot import GridPlot, LayoutPlot, AdjointLayoutPlot
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\holoviews\plotting\bokeh\hex_tiles.py:22
18 from .selection import BokehOverlaySelectionDisplay
19 from .styles import base_properties, line_properties, fill_properties
---> 22 class hex_binning(Operation):
23 """
24 Applies hex binning by computing aggregates on a hexagonal grid.
25
26 Should not be user facing as the returned element is not directly
27 useable.
28 """
30 aggregator = param.ClassSelector(
31 default=np.size, class_=(types.FunctionType, tuple), doc="""
32 Aggregation function or dimension transform used to compute bin
33 values. Defaults to np.size to count the number of values
34 in each bin.""")
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\holoviews\plotting\bokeh\hex_tiles.py:30, in hex_binning()
22 class hex_binning(Operation):
23 """
24 Applies hex binning by computing aggregates on a hexagonal grid.
25
26 Should not be user facing as the returned element is not directly
27 useable.
28 """
---> 30 aggregator = param.ClassSelector(
31 default=np.size, class_=(types.FunctionType, tuple), doc="""
32 Aggregation function or dimension transform used to compute bin
33 values. Defaults to np.size to count the number of values
34 in each bin.""")
36 gridsize = param.ClassSelector(default=50, class_=(int, tuple))
38 invert_axes = param.Boolean(default=False)
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\param\__init__.py:1367, in ClassSelector.__init__(self, class_, default, instantiate, is_instance, **params)
1365 self.is_instance = is_instance
1366 super(ClassSelector,self).__init__(default=default,instantiate=instantiate,**params)
-> 1367 self._validate(default)
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\param\__init__.py:1371, in ClassSelector._validate(self, val)
1369 def _validate(self, val):
1370 super(ClassSelector, self)._validate(val)
-> 1371 self._validate_class_(val, self.class_, self.is_instance)
File ~\AppData\Local\miniconda3\envs\autoviz-test\Lib\site-packages\param\__init__.py:1383, in ClassSelector._validate_class_(self, val, class_, is_instance)
1381 if is_instance:
1382 if not (isinstance(val, class_)):
-> 1383 raise ValueError(
1384 "%s parameter %r value must be an instance of %s, not %r." %
1385 (param_cls, self.name, class_name, val))
1386 else:
1387 if not (issubclass(val, class_)):
ValueError: ClassSelector parameter None value must be an instance of (function, tuple), not <function size at 0x000001948F4DD3F0>.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
thewchan commented
Thanks, I'll try that
AutoViML commented
I don't know what's in your machine. But you need to pip install each of those 4 libraries I cited with the exact version I mentioned and see if it fixes the problem.Sorry I can't help you further.Auto Vimal
On Tuesday, July 4, 2023 at 11:28:40 AM EDT, Matt Chan ***@***.***> wrote:
@AutoViML can you tell me which package has a version mismatch?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
thewchan commented
@AutoViML let me try again and i can tell you what version is being installed by pip into the virtual environment
thewchan commented
Here's my local environment:
# Name Version Build Channel
anyio 3.7.1 pypi_0 pypi
argon2-cffi 21.3.0 pypi_0 pypi
argon2-cffi-bindings 21.2.0 pypi_0 pypi
arrow 1.2.3 pypi_0 pypi
asttokens 2.2.1 pypi_0 pypi
attrs 23.1.0 pypi_0 pypi
autoviz 0.1.730 pypi_0 pypi
backcall 0.2.0 pypi_0 pypi
beautifulsoup4 4.12.2 pypi_0 pypi
bleach 6.0.0 pypi_0 pypi
bokeh 2.4.3 pypi_0 pypi
bzip2 1.0.8 h8ffe710_4 conda-forge
ca-certificates 2023.5.7 h56e8100_0 conda-forge
certifi 2023.5.7 pypi_0 pypi
cffi 1.15.1 pypi_0 pypi
charset-normalizer 3.1.0 pypi_0 pypi
click 8.1.4 pypi_0 pypi
colorama 0.4.6 pypi_0 pypi
colorcet 3.0.1 pypi_0 pypi
comm 0.1.3 pypi_0 pypi
contourpy 1.1.0 pypi_0 pypi
cycler 0.11.0 pypi_0 pypi
debugpy 1.6.7 pypi_0 pypi
decorator 5.1.1 pypi_0 pypi
defusedxml 0.7.1 pypi_0 pypi
emoji 2.6.0 pypi_0 pypi
executing 1.2.0 pypi_0 pypi
fastjsonschema 2.17.1 pypi_0 pypi
fonttools 4.40.0 pypi_0 pypi
fqdn 1.5.1 pypi_0 pypi
fsspec 2023.6.0 pypi_0 pypi
holoviews 1.14.9 pypi_0 pypi
hvplot 0.7.3 pypi_0 pypi
idna 3.4 pypi_0 pypi
ipykernel 6.24.0 pypi_0 pypi
ipython 8.14.0 pypi_0 pypi
ipython-genutils 0.2.0 pypi_0 pypi
ipywidgets 8.0.7 pypi_0 pypi
isoduration 20.11.0 pypi_0 pypi
jedi 0.18.2 pypi_0 pypi
jinja2 3.1.2 pypi_0 pypi
joblib 1.3.1 pypi_0 pypi
jsonpointer 2.4 pypi_0 pypi
jsonschema 4.18.0 pypi_0 pypi
jsonschema-specifications 2023.6.1 pypi_0 pypi
jupyter 1.0.0 pypi_0 pypi
jupyter-client 8.3.0 pypi_0 pypi
jupyter-console 6.6.3 pypi_0 pypi
jupyter-core 5.3.1 pypi_0 pypi
jupyter-events 0.6.3 pypi_0 pypi
jupyter-server 2.7.0 pypi_0 pypi
jupyter-server-terminals 0.4.4 pypi_0 pypi
jupyterlab-pygments 0.2.2 pypi_0 pypi
jupyterlab-widgets 3.0.8 pypi_0 pypi
kiwisolver 1.4.4 pypi_0 pypi
libexpat 2.5.0 h63175ca_1 conda-forge
libffi 3.4.2 h8ffe710_5 conda-forge
libsqlite 3.42.0 hcfcfb64_0 conda-forge
libzlib 1.2.13 hcfcfb64_5 conda-forge
markdown 3.4.3 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
matplotlib 3.7.2 pypi_0 pypi
matplotlib-inline 0.1.6 pypi_0 pypi
mistune 3.0.1 pypi_0 pypi
nbclassic 1.0.0 pypi_0 pypi
nbclient 0.8.0 pypi_0 pypi
nbconvert 7.6.0 pypi_0 pypi
nbformat 5.9.0 pypi_0 pypi
nest-asyncio 1.5.6 pypi_0 pypi
nltk 3.8.1 pypi_0 pypi
notebook 6.5.4 pypi_0 pypi
notebook-shim 0.2.3 pypi_0 pypi
numpy 1.25.0 pypi_0 pypi
openssl 3.1.1 hcfcfb64_1 conda-forge
overrides 7.3.1 pypi_0 pypi
packaging 23.1 pypi_0 pypi
pandas 2.0.3 pypi_0 pypi
pandas-dq 1.28 pypi_0 pypi
pandocfilters 1.5.0 pypi_0 pypi
panel 0.14.4 pypi_0 pypi
param 1.13.0 pypi_0 pypi
parso 0.8.3 pypi_0 pypi
patsy 0.5.3 pypi_0 pypi
pickleshare 0.7.5 pypi_0 pypi
pillow 10.0.0 pypi_0 pypi
pip 23.1.2 pyhd8ed1ab_0 conda-forge
platformdirs 3.8.0 pypi_0 pypi
prometheus-client 0.17.0 pypi_0 pypi
prompt-toolkit 3.0.39 pypi_0 pypi
psutil 5.9.5 pypi_0 pypi
pure-eval 0.2.2 pypi_0 pypi
pyamg 5.0.1 pypi_0 pypi
pycparser 2.21 pypi_0 pypi
pyct 0.5.0 pypi_0 pypi
pygments 2.15.1 pypi_0 pypi
pyparsing 3.0.9 pypi_0 pypi
python 3.11.4 h2628c8c_0_cpython conda-forge
python-dateutil 2.8.2 pypi_0 pypi
python-json-logger 2.0.7 pypi_0 pypi
pytz 2023.3 pypi_0 pypi
pyviz-comms 2.3.2 pypi_0 pypi
pywin32 306 pypi_0 pypi
pywinpty 2.0.10 pypi_0 pypi
pyyaml 6.0 pypi_0 pypi
pyzmq 25.1.0 pypi_0 pypi
qtconsole 5.4.3 pypi_0 pypi
qtpy 2.3.1 pypi_0 pypi
referencing 0.29.1 pypi_0 pypi
regex 2023.6.3 pypi_0 pypi
requests 2.31.0 pypi_0 pypi
rfc3339-validator 0.1.4 pypi_0 pypi
rfc3986-validator 0.1.1 pypi_0 pypi
rpds-py 0.8.8 pypi_0 pypi
scikit-learn 1.3.0 pypi_0 pypi
scipy 1.11.1 pypi_0 pypi
seaborn 0.12.2 pypi_0 pypi
send2trash 1.8.2 pypi_0 pypi
setuptools 68.0.0 pyhd8ed1ab_0 conda-forge
six 1.16.0 pypi_0 pypi
sniffio 1.3.0 pypi_0 pypi
soupsieve 2.4.1 pypi_0 pypi
stack-data 0.6.2 pypi_0 pypi
statsmodels 0.14.0 pypi_0 pypi
terminado 0.17.1 pypi_0 pypi
textblob 0.17.1 pypi_0 pypi
threadpoolctl 3.1.0 pypi_0 pypi
tinycss2 1.2.1 pypi_0 pypi
tk 8.6.12 h8ffe710_0 conda-forge
tornado 6.3.2 pypi_0 pypi
tqdm 4.65.0 pypi_0 pypi
traitlets 5.9.0 pypi_0 pypi
typing-extensions 4.7.1 pypi_0 pypi
tzdata 2023.3 pypi_0 pypi
ucrt 10.0.22621.0 h57928b3_0 conda-forge
uri-template 1.3.0 pypi_0 pypi
urllib3 2.0.3 pypi_0 pypi
vc 14.3 h64f974e_17 conda-forge
vc14_runtime 14.36.32532 hfdfe4a8_17 conda-forge
vs2015_runtime 14.36.32532 h05e6639_17 conda-forge
wcwidth 0.2.6 pypi_0 pypi
webcolors 1.13 pypi_0 pypi
webencodings 0.5.1 pypi_0 pypi
websocket-client 1.6.1 pypi_0 pypi
wheel 0.40.0 pyhd8ed1ab_0 conda-forge
widgetsnbextension 4.0.8 pypi_0 pypi
wordcloud 1.9.2 pypi_0 pypi
xgboost 1.7.6 pypi_0 pypi
xlrd 2.0.1 pypi_0 pypi
xz 5.2.6 h8d14728_0 conda-forge
thewchan commented
Fort he relevant packages you listed here is what I have:
bokeh 2.4.3
hvplot 0.7.3
holoviews 1.14.9
panel 0.14.4
rjk-git commented
same error
rjk-git commented
same error
resolved by running "pip install holoviews --upgrade".