Bad response status code 500 on getImage #55
Description
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);
});`