chartpy icon indicating copy to clipboard operation
chartpy copied to clipboard

Headless Offline Plotting fails

Open Immortalin opened this issue 8 years ago • 4 comments

Hi! Plotting fails when ran headlessly i.e. without iPython notebook, just the python interpreter due to the iplot function.

E.g. python canvas_demo.py gives

/chartpy/engine.py", line 1449, in plot_chart
    fig = data_frame.iplot(kind=chart_type_ord,
AttributeError: 'DataFrame' object has no attribute 'iplot'

Immortalin avatar Sep 17 '17 19:09 Immortalin

I suspect you might not have Python package cufflinks installed? You might also need to check the chartconstants.py file (eg. plotly_plot_mode = 'offline_html' # 'online', 'offline_jupyter')

saeedamen avatar Sep 18 '17 17:09 saeedamen

@saeedamen can the dependency on cufflinks be removed? Cufflinks requires iPython, which adds additional dependencies for headless setups.

Immortalin avatar Sep 19 '17 03:09 Immortalin

@Immortalin it's a bit difficult to remove the Cufflinks depenency. I use Cufflinks to make the underlying Plotly API easier to call (and use directly with pandas DataFrames). Also I suspect many users will end up using it to plot in IPython notebooks anyway. I give the option though of directing the plots to different outputs though, HTML online/offline and IPython too.

saeedamen avatar Sep 19 '17 12:09 saeedamen

help me please i am a student and i based my research paper on iplot i have a serious problem from yesterday i tried to find solution with pasting errors but with no result

ModuleNotFoundError: No module named 'plotly.subplots' AttributeError: 'DataFrame' object has no attribute 'iplot'

in the terminal cufflinks 0.17.0 has requirement plotly>=4.1.1, but you'll have plotly 2.7.0 which is incompatible.

nnadiabfata avatar Dec 06 '19 06:12 nnadiabfata