You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
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');
We fixed the issue in Plotly Cloud; sorry for any inconvenience this caused.
Note that the node.js library is using currently performing image generation using a legacy endpoint (/apigenimage) that’s unsupported and may break again. We welcome a PR from the community to switch over to the new endpoint, available and documented here. The new endpoint takes the same JSON body but authentication has changed somewhat.
I'm reopening this issue in case someone wants to take this on.
@scjody Thanks a lot for the quick fix but unfortunately I was able to see the same error in production logs today. Is there anything else that we need to do at our end?
The only difference I observed is that, It wasn't able to generate a single image yesterday but today its giving the error on 3rd image and sometimes on 4th.
at ClientRequest.handleResponse (/app/node_modules/plotly/index.js:237:25)
at Object.onceWrapper (events.js:316:30)
at emitOne (events.js:115:13)
at ClientRequest.emit (events.js:210:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:564:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
at TLSSocket.socketOnData (_http_client.js:453:20)
at emitOne (events.js:115:13)
at TLSSocket.emit (events.js:210:7)
at addChunk (_stream_readable.js:252:12)
at readableAddChunk (_stream_readable.js:239:11)
at TLSSocket.Readable.push (_stream_readable.js:197:10)
at TLSWrap.onread (net.js:589:20) msg: undefined }```
@wal-nadeem If you're able to generate images some of the time then this is a different error. I still have some improvements to /apigenimage planned for later this week that might help but ultimately the best approach is to switch to the new, more reliable endpoint.
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.
@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
Activity
etpinard commentedon Jan 15, 2018
Are you consistently hitting a 500 or once out of a few requests?
pepe11 commentedon Jan 16, 2018
I've the same problem; on every execution hits a 500.
w-abdullah commentedon Jan 16, 2018
Receiving status code 500
Error: Bad response status code 500wal-nadeem commentedon Jan 16, 2018
We are also facing the same issue.
We have background worker which creates different visualizations and embed them in a PDF.
Upon investigation today, we saw the same error in the logs which is originally reported above. Its happening for every call.
bpostlethwaite commentedon Jan 16, 2018
A fix is rolling out asap
bpostlethwaite commentedon Jan 16, 2018
The fix targets the Plotly cloud - this library code is unaffected.
scjody commentedon Jan 16, 2018
We fixed the issue in Plotly Cloud; sorry for any inconvenience this caused.
Note that the node.js library is using currently performing image generation using a legacy endpoint (
/apigenimage) that’s unsupported and may break again. We welcome a PR from the community to switch over to the new endpoint, available and documented here. The new endpoint takes the same JSON body but authentication has changed somewhat.I'm reopening this issue in case someone wants to take this on.
wal-nadeem commentedon Jan 17, 2018
@scjody Thanks a lot for the quick fix but unfortunately I was able to see the same error in production logs today. Is there anything else that we need to do at our end?
The only difference I observed is that, It wasn't able to generate a single image yesterday but today its giving the error on 3rd image and sometimes on 4th.
scjody commentedon Jan 17, 2018
@wal-nadeem If you're able to generate images some of the time then this is a different error. I still have some improvements to
/apigenimageplanned for later this week that might help but ultimately the best approach is to switch to the new, more reliable endpoint.AndreasKacofegitis commentedon Jan 18, 2018
Thanks for the fix. Back up and running.
scjody commentedon Jan 25, 2018
Our planned fixes and stability improvements to
/apigenimageare 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.
SpencerKaiser commentedon Apr 2, 2018
@scjody @bpostlethwaite - just started getting 500's consistently for the
getImagerequest after hittinggetFiguresuccessfully 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