AutoViML / AutoViz

Automatically Visualize any dataset, any size with a single line of code. Created by Ram Seshadri. Collaborators Welcome. Permission Granted upon Request.
Apache License 2.0
1.71k stars 197 forks source link

Error thrown while running Autoviz in python file #50

Closed sahanaraguram2000 closed 8 months ago

sahanaraguram2000 commented 2 years ago

I have a file called Autoviz.py with the following lines of code

from autoviz.AutoViz_Class import AutoViz_Class

AV = AutoViz_Class()

filename = "Iris.csv"
sep = ","
dft = AV.AutoViz(
    filename,
    sep=",",
    depVar="",
    dfte=None,
    header=0,
    verbose=2,
    lowess=False,
    chart_format="png",
)

Now when I run this python file from the terminal with the python Autoviz.py I get the following error.

(saana) E:\on_nine_ai\testing data>python Autoviz.py
Traceback (most recent call last):
  File "Autoviz.py", line 1, in <module>
    from autoviz.AutoViz_Class import AutoViz_Class
  File "C:\Users\LENOVO\anaconda3\envs\saana\lib\site-packages\autoviz\__init__.py", line 2, in <module>
    from autoviz.AutoViz_Class import AutoViz_Class
  File "C:\Users\LENOVO\anaconda3\envs\saana\lib\site-packages\autoviz\AutoViz_Class.py", line 61, in <module>
    from autoviz.AutoViz_Holo import AutoViz_Holo
  File "C:\Users\LENOVO\anaconda3\envs\saana\lib\site-packages\autoviz\AutoViz_Holo.py", line 31, in <module>
    get_ipython().magic('matplotlib inline')
NameError: name 'get_ipython' is not defined

But this does not happen if I run the same lines of code in a python notebook. I understand that when verbose is set to 0 or 1, the plots are generated interactively in python notebooks. But when I set verbose to 2 and run a python file, I expect a folder to be created and all the result images to be stored inside that. Please help me out with this.

AutoViML commented 2 years ago

Hi @sahanaraguram2000 👍 Sorry all for the trouble. I have fixed the bugs that was causing this verbose=2 error as well as made an upgrade to save the plots in any directory you select. Please test it the upgraded version by:

pip install autoviz --upgrade

thanks for the feedback!

sahanaraguram2000 commented 2 years ago

Thank you @AutoViML for the prompt response !

aunkidwai commented 9 months ago

Traceback (most recent call last):

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\IPython\core\interactiveshell.py:3433 in run_code exec(code_obj, self.user_global_ns, self.user_ns)

Cell In [6], line 2 from autoviz import AutoViz_Class

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\autoviz__init__.py:3 from .AutoViz_Class import AutoViz_Class

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\autoviz\AutoViz_Class.py:50 import xlrd

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\xlrd__init__.py:1187 print "EXTERNSHEET(b7-):" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

AutoViML commented 9 months ago

Hi @aunkidwai Thanks for trying out AutoViz 👍

As you can see from the error above that the error occurs in xlrd which is a separate library from AutoViz. I just Googled Searched this error message and got this from Stack Overflow

!pip install --upgrade xlrd

But if this doesn't fix it, read more here: https://stackoverflow.com/questions/63368983/print-externsheetb7-pandas

Sorry I can't help you further... Auto Vimal