iplot doesnt work

m.kofler
Newcomer
Hi,
I am struggling with to run a piece of code of the INTRODUCTION TO EIKON WEB AND SCRIPTING API webinar.
import eikon as ek
ek.set_app_id('xxxxxxxxx')
msft=ek.get_timeseries('MSFT.O',fields='CLOSE',start_date='2015-06-23',end_date='2017-06-23')
import cufflinks
msft.iplot(kind='line',color='blue',bestfit=True)
returns
Aw, snap! We don't have an account for ''. Want to try again? You can authenticate with your email address or username. Sign in is not case sensitive.
Don't have an account? plot.ly
Questions? support@plot.ly
---------------------------------------------------------------------------
PlotlyError Traceback (most recent call last)
<ipython-input-12-df8fac0cd8d5> in <module>()
----> 1msft.iplot(kind='line',color='blue',bestfit=True)
C:\Users\koflerma\AppData\Local\Continuum\Anaconda3\lib\site-packages\cufflinks\plotlytools.py in _iplot(self, data, layout, filename, sharing, kind, title, xTitle, yTitle, zTitle, theme, colors, colorscale, fill, width, dash, mode, symbol, size, barmode, sortbars, bargap, bargroupgap, bins, histnorm, histfunc, orientation, boxpoints, annotations, keys, bestfit, bestfit_colors, mean, mean_colors, categories, x, y, z, text, gridcolor, zerolinecolor, margin, labels, values, secondary_y, secondary_y_title, subplots, shape, error_x, error_y, error_type, locations, lon, lat, asFrame, asDates, asFigure, asImage, dimensions, asPlot, asUrl, online, **kwargs)
1043 return py.plot(figure,sharing=sharing,filename=filename,validate=validate,auto_open=False)
1044 else:
-> 1045return iplot(figure,sharing=sharing,filename=filename,validate=validate,online=online)
1046
1047
C:\Users\koflerma\AppData\Local\Continuum\Anaconda3\lib\site-packages\cufflinks\plotlytools.py in iplot(data_or_figure, validate, sharing, filename, online, **kwargs)
1187 filename='Plotly Playground {0}'.format(time.strftime("%Y-%m-%d %H:%M:%S"))
1188 return py.iplot(data_or_figure,validate=validate,sharing=sharing,
-> 1189 filename=filename)
1190
1191 def _ta_figure(self,**kwargs):
C:\Users\koflerma\AppData\Local\Continuum\Anaconda3\lib\site-packages\plotly\plotly\plotly.py in iplot(figure_or_data, **plot_options)
156 embed_options['height'] = str(embed_options['height']) + 'px'
157
--> 158return tools.embed(url, **embed_options)
159
160
C:\Users\koflerma\AppData\Local\Continuum\Anaconda3\lib\site-packages\plotly\tools.py in embed(file_owner_or_url, file_id, width, height)
388 else:
389 url = file_owner_or_url
--> 390return PlotlyDisplay(url, width, height)
391 else:
392 if (get_config_defaults()['plotly_domain']
C:\Users\koflerma\AppData\Local\Continuum\Anaconda3\lib\site-packages\plotly\tools.py in __init__(self, url, width, height)
1363 def __init__(self, url, width, height):
1364 self.resource = url
-> 1365self.embed_code = get_embed(url, width=width, height=height)
1366 super(PlotlyDisplay, self).__init__(data=self.embed_code)
1367
C:\Users\koflerma\AppData\Local\Continuum\Anaconda3\lib\site-packages\plotly\tools.py in get_embed(file_owner_or_url, file_id, width, height)
293 "'{1}'."
294 "\nRun help on this function for more information."
--> 295 "".format(url, plotly_rest_url))
296 urlsplit = six.moves.urllib.parse.urlparse(url)
297 file_owner = urlsplit.path.split('/')[1].split('~')[1]
PlotlyError: Because you didn't supply a 'file_id' in the call, we're assuming you're trying to snag a figure from a url. You supplied the url, '', we expected it to start with 'https://plot.ly'.
Run help on this function for more information.
I have to admit that a am not overly familiar with Jupyter.
Thanks in advance!
0
Best Answer
Answers
-
The 'cufflinks' pacakge makes use of 'plot.ly'. It looks like this has to do with using online vs. off-line methods of plot.ly. Could you restart your kernel and try again?
Could you help @jorge.santos ?
0 -
Thanks Joris. Have restarted, but no luck
0 -
Hi @m.kofler,
You have to explicitly go offline when using cufflinks if you don't have an account. For example:
import cufflinks as cf
cf.go_offline()0 -
Worked. Many thanks Nick!
0 -
Followed the steps and works, cheers Jorge!
0 -
@m.kofler: Please see iPython notebooks at TR samples github site, which have working samples using plotly and cufflinks.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 251 ETA
- 555 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 916 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛