orca error
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hi Carson Sievert,
An error occur when I want to export graph using orca.
# help orca example
p <- plot_ly(z = ~volcano) %>% add_surface()
orca(p, "surface-plot.svg")
I obtain these R output
Erreur : The orca command-line utility is required for this functionality.
Please follow the installation instructions here -- https://github.com/plotly/orca#installation
which come from your orca_available() function
orca_available <- function() {
if (Sys.which("orca") == "" || !correct_orca()) {
stop(
"The orca command-line utility is required for this functionality.\n\n",
"Please follow the installation instructions here -- https://github.com/plotly/orca#installation",
call. = FALSE
)
}
TRUE
}
but, as shown below, orca is available on my computer
$ orca
Plotly's image-exporting utilities
Usage: orca [--version] [--help] <command> [<args>]
Available commands:
- graph [or plotly-graph, plotly_graph]
Generates an image of plotly graph from inputted plotly.js JSON attributes.
For more info, run `orca graph --help`.
- serve [or server]
Boots up a server with one route per available export component
For more info, run `orca serve --help`.
The bug come from correct_orca() (orca.R, lines 201-210), with As shown below, processx::run() don't export the first line "Plotly's image-exporting utilities" of stdout which is use by grepl to return TRUE.
# orca.R lines 207-210
correct_orca <- function() {
orca_help <- processx::run("orca", "-h")
grepl("plotly", orca_help[["stdout"]], ignore.case = TRUE)
}
# processx line
> processx::run("orca", "-h")
$status
[1] 0
$stdout
[1] "Utilisation : orca [-h] [-v] [-r] [-s] [-l] [-e OPTION] [-d OPTION] [-p NOM]\n [-u RÉPERTOIRE] [--debug-file FICHIER] [--debug]\n\nParamètres facultatifs:\n -h, --help Montrer ce message d’aide et quitter\n -v, --version 3.36.2\n -r, --replace Remplace une instance actuellement lancée de\n ce lecteur d’écran\n -s, --setup Définit les préférences utilisateur (mode\n graphique)\n -l, --list-apps Affiche les applications lancées connues\n -e OPTION, --enable OPTION Force l’utilisation de l’option\n -d OPTION, --disable OPTION Empêche l’utilisation de l’option\n -p NOM, --profile NOM Charge le profil\n -u RÉPERTOIRE, --user-prefs RÉPERTOIRE\n Utilise un répertoire alternatif pour les\n préférences des utilisateurs\n --debug-file FICHIER Envoie la sortie de débogage dans le fichier\n indiqué\n --debug Envoie la sortie de débogage dans debug-AAAA-\n MM-JJ-HH:MM:SS.out\n\nRapportez les bogues à orca-list@gnome.org.\n"
$stderr
[1] ""
$timeout
[1] FALSE
Maybe you can remove correct_orca() function to prevent this bug, and because you test orca availability with Sys.which("orca") on orca_available()
Sincerely,
Aurélien BRIONNE,
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
orca.R の201〜210行目付近から始め、報告された orca() の例を、文書化されている processx::run("orca", "-h") の出力で再現してください。correct_orca() がコマンドをどのように検証し、orca_available() がその結果をどのように使用するかを確認してください。インストール済みの Orca がヘルプ出力のローカライズ時にも認識され、利用できない Orca では引き続き意図したエラーが生成されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 50/100