plotly / orca

Command line application for generating static images of interactive plotly charts
MIT License
293 stars 40 forks source link

Specifying file path when calling orca from R #348

Open cbailiss opened 3 years ago

cbailiss commented 3 years ago

I create a chart in plotly, then attempt to export it to an image specifying a full file path, but get an unhandled JavaScript error. Is this supported - or can only a filename be specified?

Example:

p <- plot_ly(...)
orca(p, "C:/Folder1/Folder2/Chart.png")

It appears as though orca is attempting to create directories, even though they definitely already exist:

[Window Title] - Error

[Main Instruction] - A JavaScript error occurred in the main process

[Content]
Uncaught Exception:
Error: EINVAL: invalid argument, mkdir 'C:/Folder1/Folder2/'
    at mkdirSync (fs.js:764:3)
    at fs.mkdirSync (electron/js2c/asar.js:725:16)
    at Object.fs.mkdirSync (electron/js2c/asar.js:725:16)
    at main ... etc etc etc ...

Using current release (1.3.1) on Windows.