orca error
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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,
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in orca.R etwa bei den Zeilen 201–210 und reproduziere das gemeldete orca()-Beispiel mit der dokumentierten Ausgabe von processx::run("orca", "-h"). Prüfe, wie correct_orca() den Befehl validiert und wie orca_available() dieses Ergebnis verwendet. Erledigt ist die Aufgabe, wenn eine installierte Orca-Ausführungsdatei auch dann erkannt wird, wenn ihre Hilfeausgabe lokalisiert ist, während nicht verfügbares Orca weiterhin den vorgesehenen Fehler erzeugt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 50/100