Updated to 4.0 killed my file export

I run CentOS 7 and up till now was using py.image.save_as to write my PNG chart to local filesystem. This seems to have been removed in 4.0 and from what I am reading, I need to now use plotly.offline and something like fig.write_image(‘test-chart.png’). But the problem is that i need Orca for that to work.

For the life of me, I can’t get Orca to work properly on CentOS headless server.

Current error is:

orca graph ‘{ “data”: [{“y”: [1,2,1]}] }’ -o fig.png

which: no desktop-file-install in (/tmp/.mount_orcaVrIBFk/app:/tmp/.mount_orcaVrIBFk/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
desktop-file-install is missing. Skipping /tmp/.mount_orcaVrIBFk/AppRun.

I’m sorry if this change caught you by surprise… you can still use what used to be plotly.plotly if you install the chart_studio package and import chart_studio.plotly as py

Thanks but what’s better if it’s only going to be used for offline chart image generation? If i have to make changes, I may as well use the preferred approach. If it is plotly.offline, just need to find out how to get working on CentOS.

When I reinstalling my environment yesterday, I notice that if I do:

pip install cufflinks
pip install plotly
pip install plotly_express

when I does

import cufflinks as cf

it will throw an error:

The plotly.plotly module is deprecated,
please install the chart-studio package and use the
chart_studio.plotly module instead

Since I used cufflinks every day, so I ended up down grade my plotly to 3.10.0. Though the problem is cufflinks’, I guess this is a heads up for everyone who are using cufflinks. Apparently, it is relate to this github issue.