plotly / plotly/plotly.R

Command 'orca' not found @win/processx.c:983

Offen
#1,741 16 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Ö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

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.