Azure-Samples / Azure-MachineLearning-DataScience

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plotly python package is broken in current conda version in Azure ML

efraintorlo opened this issue · comments

commented

Hi guys,

Firstly, I have to say that your Azure ML platform is just awesome and your decision to include Jupyter support is quite useful, thanks a lot for that!

Next, I wish to highlight a small issue that, in my humble opinion, is related with the Anaconda version that runs in the docker instances. It happens that when plotly package is imported in a Jupyter notebook the next error is obtained:

import plotly
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-3-c27a4132ad2e> in <module>()
  ----> 1 import plotly

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/plotly/__init__.py in <module>()
     29 from __future__ import absolute_import
     30 
---> 31 from plotly import (plotly, dashboard_objs, graph_objs, grid_objs, tools,
     32                     utils, session, offline, colors)
     33 from plotly.version import __version__

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/plotly/plotly/__init__.py in <module>()
      8 
      9 """
---> 10 from . plotly import (
     11     sign_in,
     12     update_plot_options,

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/plotly/plotly/plotly.py in <module>()
     27 from requests.compat import json as _json
     28 
---> 29 from plotly import exceptions, files, session, tools, utils
     30 from plotly.api import v1, v2
     31 from plotly.plotly import chunked_requests

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/plotly/tools.py in <module>()
     58 
     59 ipython_core_display = optional_imports.get_module('IPython.core.display')
---> 60 matplotlylib = optional_imports.get_module('plotly.matplotlylib')
     61 sage_salvus = optional_imports.get_module('sage_salvus')
     62 

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/plotly/optional_imports.py in get_module(name)
     21     if name not in _not_importable:
     22         try:
---> 23             return import_module(name)
     24         except ImportError:
     25             _not_importable.add(name)

/home/nbuser/anaconda3_23/lib/python3.4/importlib/__init__.py in import_module(name, package)
    107                 break
    108             level += 1
--> 109     return _bootstrap._gcd_import(name[level:], package, level)
    110 
    111 

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/plotly/matplotlylib/__init__.py in <module>()
     12 from __future__ import absolute_import
     13 
---> 14 from plotly.matplotlylib.renderer import PlotlyRenderer
     15 from plotly.matplotlylib.mplexporter import Exporter

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/plotly/matplotlylib/renderer.py in <module>()
     11 import warnings
     12 
---> 13 import plotly.graph_objs as go
     14 from plotly.matplotlylib.mplexporter import Renderer
     15 from plotly.matplotlylib import mpltools

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/plotly/graph_objs/__init__.py in <module>()
     12 from __future__ import absolute_import
     13 
---> 14 from plotly.graph_objs.graph_objs import *  # this is protected with __all__

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/plotly/graph_objs/graph_objs.py in <module>()
     32 import six
     33 
---> 34 from plotly import exceptions, graph_reference
     35 from plotly.graph_objs import graph_objs_tools
     36 

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/plotly/graph_reference.py in <module>()
    230 
    231 
--> 232 @utils.memoize()
    233 def _get_valid_attributes(object_name, parent_object_names):
    234     attributes = get_attributes_dicts(object_name, parent_object_names)

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/plotly/utils.py in memoize(maxsize)
    490         return result
    491 
--> 492     return decorator(_memoize)

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/decorator.py in decorator(caller, func)
    226             callerfunc = caller
    227             doc = caller.__doc__
--> 228             fun = getfullargspec(callerfunc).args[0]  # first arg
    229         else:  # assume caller is an object with a __call__ method
    230             name = caller.__class__.__name__.lower()

IndexError: list index out of range