You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An R extension has a command to create an R console. If the Python extension is also active and using a virtualenv/conda/etc. environment then text like 'source .../env/bin/activate' is sent to the already running R console. This is confusing because it looks like an R bug. Is there a way to avoid sending Python environment activation commands to terminals created by other extensions?
Value of the python.languageServer setting: Microsoft
Expected behaviour
New R console does not contain text like
> source [LOCATION]/python-R-test/env/bin/activate
Error: object 'home' not found'
Actual behaviour
New R console contains text like
> source [LOCATION]/python-R-test/env/bin/activate
Error: object 'home' not found'
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Install VS Code extension 'R' by Yuki Ueda
Create a folder 'python-R-test' containing empty files 'temp.R' and 'temp.py'.
Create a virtual environment in this folder:
python3 -m venv env
File -> Open Folder..., select 'python-R-test'
Make sure selected Python interpreter is 'env': venv
Use command R: Create R terminal
Observe new R terminal contains text ending in
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[1] TRUE
> source [LOCATION]/python-R-test/env/bin/activate
Error: object 'home' not found
>
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)
Hi @andycraig 👋
Unfortunately there's VSCode doesn't provide anyway for us to know if terminal is created by another extension, so I've to close this. Feel free to file it as a feature request at https://github.com/microsoft/vscode
You can switch off the extension sending activation commands by using the setting "python.terminal.activateEnvironment": false.
The activation should not be done by sending commands, still waiting on adopting of the environment variable collection API which will let the Python extension activate the environment without sending text. #11039
Hello,
An R extension has a command to create an R console. If the Python extension is also active and using a virtualenv/conda/etc. environment then text like 'source .../env/bin/activate' is sent to the already running R console. This is confusing because it looks like an R bug. Is there a way to avoid sending Python environment activation commands to terminals created by other extensions?
Related but not the same: #4959
Thank you!
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): Enabledpython.languageServer
setting: MicrosoftExpected behaviour
New R console does not contain text like
Actual behaviour
New R console contains text like
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
R: Create R terminal
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)output.txt
Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)console.log
The text was updated successfully, but these errors were encountered: