Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Session watcher not respecting reticulate delayed load, and other issues

未关闭
#1,466 3 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@ElianHugh 已经在做这个了。

开始于 2024年3月2日。

评估

这个 Issue 还没有评估数据。

描述

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.

主要语言
TypeScript
星标
1.2k
派生
147
平均合并
1 天 10 小时
30 天内合并 PR
65

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

REditorSupport/vscode-R 的其他 Issue

查看 REditorSupport/vscode-R 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。