Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Session watcher not respecting reticulate delayed load, and other issues

Offen
#1,466 3 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@ElianHugh arbeitet bereits daran.

Seit 02.3.2024.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

bug

There seems to be some weirdness happening with reticulate when working with the VSCode-R extension. It looks like VSCode-R is evaluating the reticulate/Python code in a different way than the standard R GUI console. The obvious example when using the delay_load flag when importing modules:

standard R GUI Console
library(reticulate)
start = Sys.time()
re <- import("re", delay_load = TRUE)
end = Sys.time()
end - start
#> Time difference of 0.01495004 secs
re
#> <pointer: 0x0>  # the module has not been loaded yet because delay_load = TRUE

start = Sys.time()
re$match  # trigger loading of module
#> <function match at 0x000002EA31AE8B80>
end = Sys.time()
end - start
#> Time difference of 12.2005 secs
VSCode-R Console
library(reticulate)
start = Sys.time()
re <- import("re", delay_load = TRUE)
end = Sys.time()
end - start
#> Time difference of 12.08285 secs
re
#> Module(re)  # module has been loaded

start = Sys.time()
re$match  # trigger loading of module
#> <function match at 0x000001C7AD980AF0>
end = Sys.time()
end - start
#> Time difference of 0.03116894 secs  # fast because module was already loaded

I have also been encountering cases where reticulate will throw Python errors in VSCode but not in the R GUI, and will continuously re-throw the error with every new command. However, I do not yet have a reprex for this (it most commonly occurs with the arcpy module, which is not available unless you have an ArcGIS Pro license). I'll post again here if I can reproduce the issue with a publicly-available module.

Vorherrschende Sprache
TypeScript
Sterne
1.2k
Forks
151
Ø Merge
1 T. 6 Std.
Gemergte PRs (30 T.)
81

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus REditorSupport/vscode-R

Alle Issues in REditorSupport/vscode-R

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.