Command 'orca' not found @win/processx.c:983
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I want to export a plotly object to a static image using plotly::orca on Win10, but I'm a getting the following error:
<c_error in rethrow_call(c_processx_exec, command, c(command, args), stdin, ...:
Command 'orca' not found @win/processx.c:983 (processx_exec)>
The problem seems to be not orca itself but processx::run. I wrote my own little orca function using base::system instead which works just fine.
Here is the same issue.
p <- plot_ly(mtcars, x = ~mpg, y = ~wt)
## Fails
plotly::orca(p)
## Works
file = "plot.png"; format = "png"
debug=verbose=safe=F
b <- plotly_build(p)
plotlyjs <- plotly:::plotlyjsBundle(b)
plotlyjs_path <- file.path(plotlyjs$src$file, plotlyjs$script)
if (!is.null(plotlyjs$package)) {
plotlyjs_path <- system.file(plotlyjs_path, package = plotlyjs$package)
}
tmp <- tempfile(fileext = ".json")
cat(plotly:::to_JSON(b$x[c("data", "layout")]), file = tmp)
args <- c("graph", tmp, "-o", file, "--format",
format, "--plotlyjs", plotlyjs_path, if (debug) "--debug",
if (verbose) "--verbose", if (safe) "--safe-mode")
base::system(paste("orca", paste(args, collapse = " ")))
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere den Win10-Fehler mit plotly::orca(p) anhand des mtcars-Beispiels und untersuche anschließend den Aufruf von processx::run und vergleiche ihn mit dem im Bericht gezeigten funktionierenden base::system-Befehl. Erledigt ist die Aufgabe, wenn plotly::orca das Diagramm unter Windows als statisches Bild exportieren kann, ohne den Fehler "Command 'orca' not found".
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- plotly, r
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 30/100