microsoft / jupyter-Kqlmagic

Extension (Magic) to Jupyter notebook and Jupyter lab, that enable notebook experience working with Kusto, ApplicationInsights, and LogAnalytics data.
Other
85 stars 31 forks source link

ImportError: The plotly.plotly module is deprecated; while loading Kqlmagic #58

Closed jjsantanna closed 4 years ago

jjsantanna commented 4 years ago

I'm running a Microsoft Azure Notebook. After updating the pip (!pip install --upgrade pip) and installing Kqlmagic (!pip3 install --ignore-installed Kqlmagic --no-cache-dir --upgrade), I was trying to load the Kqlmagic (%reload_ext Kqlmagic) but I've received the following error:

`

ImportError Traceback (most recent call last)

in () ----> 1 get_ipython().run_line_magic('reload_ext', 'Kqlmagic') ~/anaconda3_420/lib/python3.5/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth) 2093 def showindentationerror(self): 2094 """Called by _run_cell when there's an IndentationError in code entered -> 2095 at the prompt. 2096 2097 This is overridden in TerminalInteractiveShell to show a message about in reload_ext(self, module_str) ~/anaconda3_420/lib/python3.5/site-packages/IPython/core/magic.py in (f, *a, **k) 185 # but it's overkill for just that one bit of state. 186 def magic_deco(arg): --> 187 call = lambda f, *a, **k: f(*a, **k) 188 189 if callable(arg): ~/anaconda3_420/lib/python3.5/site-packages/IPython/core/magics/extension.py in reload_ext(self, module_str) 61 if not module_str: 62 raise UsageError('Missing module name.') ---> 63 self.shell.extension_manager.reload_extension(module_str) ~/anaconda3_420/lib/python3.5/site-packages/IPython/core/extensions.py in reload_extension(self, module_str) 133 if hasattr(mod, 'load_ipython_extension'): 134 mod.load_ipython_extension(self.shell) --> 135 return True 136 137 def _call_unload_ipython_extension(self, mod): ~/anaconda3_420/lib/python3.5/site-packages/IPython/core/extensions.py in load_extension(self, module_str) 83 "We recommend managing extensions like any " 84 "other Python packages, in site-packages.").format( ---> 85 dir=compress_user(self.ipython_extension_dir))) 86 mod = sys.modules[module_str] 87 if self._call_load_ipython_extension(mod): ~/anaconda3_420/lib/python3.5/importlib/__init__.py in import_module(name, package) 124 break 125 level += 1 --> 126 return _bootstrap._gcd_import(name[level:], package, level) 127 128 ~/anaconda3_420/lib/python3.5/importlib/_bootstrap.py in _gcd_import(name, package, level) ~/anaconda3_420/lib/python3.5/importlib/_bootstrap.py in _find_and_load(name, import_) ~/anaconda3_420/lib/python3.5/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_) ~/anaconda3_420/lib/python3.5/importlib/_bootstrap.py in _load_unlocked(spec) ~/anaconda3_420/lib/python3.5/importlib/_bootstrap_external.py in exec_module(self, module) ~/anaconda3_420/lib/python3.5/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds) ~/anaconda3_420/lib/python3.5/site-packages/Kqlmagic/__init__.py in () 5 # -------------------------------------------------------------------------- 6 ----> 7 from .magic_extension import * 8 from .version import VERSION 9 ~/anaconda3_420/lib/python3.5/site-packages/Kqlmagic/magic_extension.py in () 6 7 from Kqlmagic.constants import Constants ----> 8 from Kqlmagic.kql_magic import Kqlmagic as Magic 9 10 ~/anaconda3_420/lib/python3.5/site-packages/Kqlmagic/kql_magic.py in () 28 from azure.kusto.data.exceptions import KustoError 29 ---> 30 from Kqlmagic.results import ResultSet 31 from Kqlmagic.parser import Parser 32 from Kqlmagic.parameterizer import Parameterizer ~/anaconda3_420/lib/python3.5/site-packages/Kqlmagic/results.py in () 24 import plotly 25 ---> 26 import plotly.plotly as py 27 import plotly.graph_objs as go 28 ~/anaconda3_420/lib/python3.5/site-packages/plotly/plotly/__init__.py in () 2 from _plotly_future_ import _chart_studio_error 3 ----> 4 _chart_studio_error("plotly") ~/anaconda3_420/lib/python3.5/site-packages/_plotly_future_/__init__.py in _chart_studio_error(submodule) 47 chart_studio.{submodule} module instead. 48 """.format( ---> 49 submodule=submodule 50 ) 51 ) ImportError: The plotly.plotly module is deprecated, please install the chart-studio package and use the chart_studio.plotly module instead. `
jjsantanna commented 4 years ago

This problem doesn't happen when I load it in the jupyter notebook on my macbook.

mbnshtck commented 4 years ago

fixed in version 0.1.112