Hi,
I am trying to run the github example for getImage() function and i am getting the error “Bad response status code 301”.
github-example:
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);
});
The same code was working fine two days ago, so i believe that the issue is related to the new url change.
Thanks for your help,
Thomas