Trying to use streaming from python on free account from RPi with temp sensor.
Error msg:
Traceback (most recent call last):
File “temp2plotly.py”, line 48, in
print py.plot(fig, filename=‘RPiTemp’)
File “/usr/local/lib/python2.7/dist-packages/plotly/plotly/plotly.py”, line 233, in plot
response = v1.clientresp(data, **plot_options)
File “/usr/local/lib/python2.7/dist-packages/plotly/api/v1/clientresp.py”, line 35, in clientresp
response = request(‘post’, url, data=payload)
File “/usr/local/lib/python2.7/dist-packages/plotly/api/v1/utils.py”, line 86, in request
validate_response(response)
File “/usr/local/lib/python2.7/dist-packages/plotly/api/v1/utils.py”, line 38, in validate_response
raise exceptions.PlotlyRequestError(message, status_code, content)
plotly.exceptions.PlotlyRequestError: Uh oh, an error occurred on the server.
Python program:
from plotly.graph_objs import Scatter, Layout, Figure # plotly graph objects
import time
import os
import datetime
# setup plotly
username = 'nstaff'
api_key = 'my key was here'
stream_token = 'my token was here'
py.sign_in(username, api_key)
# start plotly plot
trace1 = Scatter(
x=[],
y=[],
stream=dict(
token=stream_token,
maxpoints=200))
layout = Layout(title='RPi tank temp data')
fig = Figure(data=[trace1], layout=layout)
print py.plot(fig, filename='RPiTemp')
Thanks in advance. -Neil