Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Session watcher not respecting reticulate delayed load, and other issues

Đang mở
#1,466 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ElianHugh đang làm issue này rồi.

Từ ngày 2/3/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
1.2k
Fork
145
Merge trung bình
19 giờ 50 phút
Pull request đã merge (30 ngày)
27

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của REditorSupport/vscode-R

Tất cả issue của REditorSupport/vscode-R

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.