Black Lives Matter. Please consider donating to Black Girls Code today.

PlotlyRequestError

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

Same "PlotlyRequestError: Uh oh, an error occurred on the server. " here since a few days!
Permanently deleting all but 2 files did not help.

Same issue with a previously existing and workable graph/filename using streams with python.

I am getting this error:

Traceback (most recent call last):
File “Stream_IoT_Prediction_Dashboard_plotly.py”, line 156, in
py.iplot(fig, filename=‘IoT Demo’)
File “/opt/miniconda2/envs/Python35/lib/python3.5/site-packages/plotly/plotly/plotly.py”, line 140, in iplot
url = plot(figure_or_data, **plot_options)
File “/opt/miniconda2/envs/Python35/lib/python3.5/site-packages/plotly/plotly/plotly.py”, line 233, in plot
response = v1.clientresp(data, **plot_options)
File “/opt/miniconda2/envs/Python35/lib/python3.5/site-packages/plotly/api/v1/clientresp.py”, line 35, in clientresp
response = request(‘post’, url, data=payload)
File “/opt/miniconda2/envs/Python35/lib/python3.5/site-packages/plotly/api/v1/utils.py”, line 86, in request
validate_response(response)
File “/opt/miniconda2/envs/Python35/lib/python3.5/site-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.

I’ve regenerated my API key and added new tokens for streams. No change to error.

Does anybody from Plotly take a look at these posts and shed some light on what is going on??

any luck?
I have the same issue…

"PlotlyRequestError: Uh oh, an error occurred on the server. " Still not solved. 4 days now

same here not any luck yet…

Hi!

I have been trying the same with a Raspberry Pi, following this and have exactly the same issue…

Can this be related??

Streaming Support
Streaming is no longer supported in Plotly Cloud.
Streaming is still available as part of Plotly On-Premises. Additionally, Dash supports streaming, as demonstrated by the Dash Wind Streaming example.

From here

Please note we no longer support streaming for cloud users: https://plot.ly/python/streaming-tutorial/