Hi all,
I am having some issues trying to get my stream implementation to work. For the simple, static implementation everything is working fine. However, once I add my stream to the trace I am getting the notification that an error occurred on the server. I have triple-checked my API-keys and am at a loss. Below you will find my code. All I can think of is that it might be a firewall issue. Does anybody have experience with this?
Thanks in advance,
Thomas
import plotly.plotly as py
import plotly.tools as tls
from plotly.graph_objs import *
stream_ids = tls.get_credentials_file()['stream_ids']
stream_id = stream_ids[0]
trace1 = Scatter(
x=[],
y=[],
stream=dict(token=stream_id) # (!) embed stream id, 1 per trace
)
s = py.Stream(stream_id)
s.open()
data = Data([trace1])
layout = Layout(title='Test')
fig = Figure(data=data, layout=layout)
py.plot(fig, filename='test')
while True:
x_data_point = mb_dict['position'][0]
y_data_point = mb_dict['position'][1]
s.write({'x': x_data_point, 'y': y_data_point})
time.sleep(80. / 1000.)