plotly / plotly/plotly.R

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

Open
#1,741 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
2.7k
Forks
641
PR merge metrics
No merged PRs in 30d

Description

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 = " ")))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Win10 failure with plotly::orca(p) using the mtcars example, then inspect the processx::run invocation and compare it with the working base::system command shown in the report. Done means plotly::orca can export the plot to a static image on Windows without the "Command 'orca' not found" error.

Written by the indexing model from the issue text.

Assessment

Tech stack
plotly, r
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.