0

I have a small program that I wrote to analyze large data sets from a device at my work and graph the data using Plotly. Up until recently it was working well, however in the past week it has been giving a 504 Gateway Timeout server error when it goes to graph the data. Nothing has changed in the code, although I've tried altering the graphing portion of it. I've attempted a re-install of both python/anaconda, as well as installing and updating the plotly python libraries. I've re-initialized the API credentials for plotly as well using three different accounts with no success. So far the error has persisted despite all efforts, although I am able to graph to plotly when using the python console.

Any help with this would be very useful. I can post portions of the code if necessary. Below is the error that the console outputs.

File "NKDA_2.1.py", line 51, in thisPulseCount, thisArcCount, thisMaxCurrent = FH.processFile(procedureID, currentProcedure, resultsFolder) File "C:\Users\cellison\Documents\Data Analysis\fileHandling.py", line 97, in processFile unique_url = py.plot(fig, filename=graphName) File "C:\Users\cellison\AppData\Local\Continuum\Anaconda\lib\site-packages\plotly\plotly\plotly.py", line 262, in plot res = _send_to_plotly(figure, **plot_options) File "C:\Users\cellison\AppData\Local\Continuum\Anaconda\lib\site-packages\plotly\plotly\plotly.py", line 1421, in _send_to_plotly r.raise_for_status() File "C:\Users\cellison\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\models.py", line 851, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 504 Server Error: GATEWAY_TIMEOUT

  • Hey Connor -- A gateway timeout is a server error, not necessarily an error with your code. These errors happen when it takes too long to process a request (eg >60 seconds). This can happen if the plot that you are creating is too large (e.g. >10 million points) or if there just happens to be a lot of people on the website at the point of request. You might try to catch the error (http://stackoverflow.com/questions/16511337) and then retry a minute or so later. Also, make sure that the graphs that you are trying to make aren't too large! – Chris P Sep 23 '15 at 21:40
  • 1
    Thanks Chris! Turns out there was an error in the code that was creating a recursively large data set, all fixed now. – Connor Whitman Sep 27 '15 at 20:16

0 Answers0