Comments (3)
This seems to be caused by the setting r.session.watchGlobalEnvironment
. Setting this to false
results in import("re", delay_load = TRUE)
working as expected. It also resolved the continuous error throw issue in my last paragraph.
It seems that the session watcher is not working quite right with reticulate connections to Python modules and objects.
from vscode-r.
The issue is encountered in the VSCode-R session watcher function, and specifically this line triggers the evaluation. This code gets evaluated because is_promise()
and is_active()
both return FALSE
for a delayed-load module (and thus the "else" part of the if-else statement is evaluated).
Perhaps the most straightforward solution is to add a condition in inspect_env()
for checking if the object is a python.builtin.module
and/or python.builtin.object
object, and if so to avoid inspecting it.
from vscode-r.
Thanks for the detailed writeup @mkoohafkan.
Your solution definitely works, and I'm happy to write a PR soon to remedy this. It would be nice to have non-delayed modules still be evaluated, but I haven't found a way of inspecting that from within R.
from vscode-r.
Related Issues (20)
- Adjust position of "Viewer" HOT 1
- Unable to read in large Excel file (~88,000 Kb) with read_xlsx. HOT 5
- vscode version constraint may need bumping
- r.libPaths setting for renv-enabled projects not working HOT 1
- "Error identifying terminal!" When trying to open R server
- Migrating ~/vscode-R directory to XDG appropiate locations - Linux
- How to allocate a keyboard shortcut to Restart R? HOT 3
- Disable linting when previewing file differences in source control panel HOT 3
- Data viewer with Tabulator HOT 2
- Rtmp files left in /tmp directory HOT 4
- Setup with conda installed R: attaching active Terminal fails HOT 4
- httpgd has been archived the 24/01/2024 HOT 4
- Environment variables inaccessible from R Interactive after change from bash to zsh HOT 1
- Change default file extension from .r to .R
- Running extension error HOT 2
- open plot in external browser cannot load image in vscode insider HOT 1
- Expand Session watcher when parantheses HOT 1
- how to show variables? HOT 2
- Support launching Shiny apps via the run button in VS Code HOT 4
- Convert stale bot to be manual rather than automatic HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-r.