Skip to content

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

Description

@trafficonese

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions