Cannot write_image with orca

Hi @rojasjo,

This is very helpful information. plotly.py directs orca to use the version of plotly.js (the JavaScript library) that comes bundled with plotly.py. This is located in the package_data directory under the top-level plotly package directory. Iโ€™m not very familiar with PyInstaller, but is there a way to make sure that package data is included in the resulting installed application?

What output do you get if you run the following from within your compiled application?

import plotly.io as pio
print(pio.orca.config.plotlyjs)

The question is, is there anything you can do in the PyInstaller configuration to make sure the plotly.js bundle shows up at this location.

Unfortunately, the pio.orca.config.plotlyjs path is read-only so you canโ€™t change the path in the public API. But Iโ€™m open to making this more configurable if we come up with a better workflow for use inside PyInstaller. If you want to play around with changing the path, you can do so in the following private/unstable way:

import plotly.io as pio
pio.orca.config._constants['plotlyjs']  = new_plotlyjs

If internet access is available then you could set this to the string 'latest' to tell orca to load the latest stable version of plotly.js from the online CDN.

The C:/Users/username/.plotly directory is optional, so that fact that itโ€™s missing shouldnโ€™t be a problem in itself.

Hope that helps,
-Jon