question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bad response status code 500 on getImage

See original GitHub issue

Executing the example for getImage fails with: { Error: Bad response status code 500 at ClientRequest.handleResponse (/home/berengar/npmproj/pytrader/node_modules/plotly/index.js:237:25) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:116:13) at ClientRequest.emit (events.js:211:7) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:551:21) at HTTPParser.parserOnHeadersComplete (_http_common.js:117:23) at TLSSocket.socketOnData (_http_client.js:440:20) at emitOne (events.js:116:13) at TLSSocket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) msg: undefined }

The code which was executed(with valid ‘username’,‘apiKey’): `var plotly = require(‘plotly’)(‘username’,‘apiKey’); var fs = require(‘fs’);

var trace1 = { x: [1, 2, 3, 4], y: [10, 15, 13, 17], type: “scatter” };

var figure = { ‘data’: [trace1] };

var imgOpts = { format: ‘png’, width: 1000, height: 500 };

plotly.getImage(figure, imgOpts, function (error, imageStream) { if (error) return console.log (error);

var fileStream = fs.createWriteStream('1.png');
imageStream.pipe(fileStream);

});`

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
scjodycommented, Jan 25, 2018

Our planned fixes and stability improvements to /apigenimage are now fully deployed to Plotly Cloud. No further fixes are planned to this legacy endpoint.

If anyone is still experiencing this issue (either intermittently or full time), the best approach is to switch this library over to the new image generation endpoint. Pull requests from the community are more than welcome; we regret that since this library hasn’t seen significant customer use we don’t have the resources to make the changes ourselves.

0reactions
SpencerKaisercommented, Apr 3, 2018

@scjody @bpostlethwaite - just started getting 500’s consistently for the getImage request after hitting getFigure successfully and using the figure object that responded with 😕

Edit: I wish I was making this up, but including the (not -) character in a axis title was creating a figure that would throw a 500 on retrieval. I’ll create a new issue for that now 😂. Created the issue: #56

Read more comments on GitHub >

github_iconTop Results From Across the Web

getImage() Bad Response 500 error - plotly.js
I keep getting this error: Bad response status code 500 from the index.js within plotly (line 237:25). I've seen documentation for a 301 ......
Read more >
500 Internal Server Error | Apigee Edge
The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from...
Read more >
Getting Server Error while fetching images from get request of ...
500 (Internal Server Error) - that's mean the error is on the server-side, not on your jquery client-side. · Try to debug your...
Read more >
500 Internal Server Error - HTTP - MDN Web Docs - Mozilla
This error response is a generic "catch-all" response. Usually, this indicates the server cannot find a better 5xx error code to response.
Read more >
Common Errors - EC2 Image Builder - AWS Documentation
The request is missing an action or a required parameter. HTTP Status Code: 400. MissingAuthenticationToken. The request must contain either a valid (registered) ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found