Hi there,
I’ve just started trying to use Plotly (and I’m a bit of a Python novice) following the instructions here: https://plot.ly/python/getting-started/
No errors were reported during installation, but when I try the example:
import plotly
from plotly.graph_objs import Scatter, Layout
plotly.offline.plot({
"data": [Scatter(x=[1, 2, 3, 4], y=[4, 3, 2, 1])],
"layout": Layout(title="hello world")
})
I get the error:
[thwill@pseuk1149-centos7-vm]$ python plotly_test.py
Traceback (most recent call last):
File "plotly_test.py", line 1, in <module>
import plotly
File "/usr/lib/python2.7/site-packages/plotly/__init__.py", line 31, in <module>
from plotly import (plotly, graph_objs, grid_objs, tools, utils, session,
File "/usr/lib/python2.7/site-packages/plotly/plotly/__init__.py", line 10, in <module>
from . plotly import (
File "/usr/lib/python2.7/site-packages/plotly/plotly/plotly.py", line 27, in <module>
from plotly import exceptions, files, session, tools, utils
File "/usr/lib/python2.7/site-packages/plotly/tools.py", line 60, in <module>
matplotlylib = optional_imports.get_module('plotly.matplotlylib')
File "/usr/lib/python2.7/site-packages/plotly/optional_imports.py", line 23, in get_module
return import_module(name)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/lib/python2.7/site-packages/plotly/matplotlylib/__init__.py", line 14, in <module>
from plotly.matplotlylib.renderer import PlotlyRenderer
File "/usr/lib/python2.7/site-packages/plotly/matplotlylib/renderer.py", line 13, in <module>
import plotly.graph_objs as go
File "/usr/lib/python2.7/site-packages/plotly/graph_objs/__init__.py", line 14, in <module>
from plotly.graph_objs.graph_objs import * # this is protected with __all__
File "/usr/lib/python2.7/site-packages/plotly/graph_objs/graph_objs.py", line 34, in <module>
from plotly import exceptions, graph_reference
File "/usr/lib/python2.7/site-packages/plotly/graph_reference.py", line 232, in <module>
@utils.memoize()
File "/usr/lib/python2.7/site-packages/plotly/utils.py", line 492, in memoize
return decorator(_memoize)
File "/usr/lib/python2.7/site-packages/decorator.py", line 213, in decorator
fun = getfullargspec(callerfunc).args[0] # first arg
IndexError: list index out of range
Using Python 2.7.5 on CentOS 7.
Can anyone help?
Tom