orca icon indicating copy to clipboard operation
orca copied to clipboard

Error in rethrow_call(c_processx_exec, command, c(command, args), stdin, : Command 'orca' not found @win/processx.c:983 (processx_exec)

Open yuanzhoulvpi2017 opened this issue 4 years ago • 2 comments

image

`> sessionInfo() R version 3.6.2 (2019-12-12) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale: [1] LC_COLLATE=Chinese (Simplified)_China.936 [2] LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936 [4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] processx_3.4.2 Rtsne_0.15 cluster_2.1.0 factoextra_1.0.6 [5] plotly_4.9.2 ggplot2_3.3.0

loaded via a namespace (and not attached): [1] Rcpp_1.0.3 ggpubr_0.2.5 pillar_1.4.3
[4] compiler_3.6.2 viridis_0.5.1 tools_3.6.2
[7] dendextend_1.13.4 digest_0.6.25 packrat_0.5.0
[10] jsonlite_1.6.1 lifecycle_0.2.0 tibble_2.1.3
[13] gtable_0.3.0 viridisLite_0.3.0 pkgconfig_2.0.3
[16] rlang_0.4.5 rstudioapi_0.11 crosstalk_1.1.0.1 [19] yaml_2.2.1 ggrepel_0.8.2 gridExtra_2.3
[22] withr_2.1.2 dplyr_0.8.5 httr_1.4.1
[25] htmlwidgets_1.5.1 vctrs_0.2.4 grid_3.6.2
[28] tidyselect_1.0.0 glue_1.3.2 data.table_1.12.8 [31] R6_2.4.1 farver_2.0.3 purrr_0.3.3
[34] tidyr_1.0.2 magrittr_1.5 ps_1.3.2
[37] scales_1.1.0 htmltools_0.4.0 assertthat_0.2.1 [40] colorspace_1.4-1 ggsignif_0.6.0 lazyeval_0.2.2
[43] munsell_0.5.0 crayon_1.3.4 `

yuanzhoulvpi2017 avatar Mar 17 '20 00:03 yuanzhoulvpi2017

I am having the same problem. Since the base::system call works, I tried to rewrite my own small orca function with base::system instead of processx::run and it works fine.

p <- plot_ly(mtcars, x = ~mpg, y = ~wt)
file = "plot.png"
format = tools::file_ext(file)
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 = " ")))

trafficonese avatar Apr 08 '20 14:04 trafficonese

Thank you so much @trafficonese for troubleshooting this! It seems like Orca itself is fine but the wrapping in https://github.com/ropensci/plotly/ is not. Could you open an issue over there?

This finding may be the reason behind issues #302 #306

cc @rpkyle @dplazas @guenterhack

antoinerg avatar Apr 08 '20 15:04 antoinerg