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
Unable to use the built-in 'Run Shiny App in Terminal' button on top of an R or Python Shiny script
Steps to reproduce the issue:
Open any valid R or Python Shiny script (example here Python)
Click the 'Run Shiny App in Terminal' button
ERROR:
C:\Users\me\AppData\Local\Programs\Python\Python311\python.exe -m shiny run
--reload c:\Users\me\Documents\LocalProjects\shinyApp.py
bash: C:UsersmeAppDataLocalProgramsPythonPython311python.exe: command not found
NOTE: I tried using different terminals (Git Bash, CMD. ...), but all give the same issue.
POTENTIAL FIX
Make sure that the commands are quoted and the issue should be fixed.
Example: When copy pasting the code, quoting the paths like so ....
"C:\Users\me\AppData\Local\Programs\Python\Python311\python.exe" -m shiny run
--reload "c:\Users\me\Documents\LocalProjects\shinyApp.py"
and the app will start without issues.
Unfortunately I can't seem to find a way to edit the command run when clicking the 'Run Shiny App in Terminal' button, so I think this will need to be fixed by you.
Thanks!
PJ
The text was updated successfully, but these errors were encountered:
We just released version 2025.02.0-79 a couple days ago, which fixed a similar issue for FastAPI apps that I think should have fixed this issue with Shiny as well. I was able to run this example shiny app via the 'Run Shiny App in Terminal' button without issue, so that is a good sign!
Could you please give the 2025.02.0-79 a try and see if the issue is resolved for you?
Unfortunately the issue has not been fixed. The paths in the command are still unquoted resulting in an error that's fixed when I copy, quote and rerun again.
By the way, this message also appears alongside, regardless of the CMD or Git Bash terminal being used
Shell integration isn't supported in this terminal, so automatic preview in the Viewer pane isn't available. To use this feature, please switch to a terminal that supports shell integration.
FYI: I have also tried running the app in VS-code with the Shiny extension, and in that case it does correctly quote and run the code when clicking the button. Interestingly, when I then install this extension in Positron, it will actually override the default and run the app properly. The big downside in this case is that the extension has a requirement to have the file name be app.py or <name>_app.py which I don't like, but that's a separate issue.
System details:
Positron and OS details:
Positron Version: 2025.01.0 (system setup) build 152
Code - OSS Version: 1.95.0
Commit: 66aa3fb
Date: 2025-01-06T02:53:20.465Z
Electron: 32.2.1
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.26100
Interpreter details:
Python 3.11 and R4.4.2
Describe the issue:
Unable to use the built-in 'Run Shiny App in Terminal' button on top of an R or Python Shiny script
Steps to reproduce the issue:
ERROR:
NOTE: I tried using different terminals (Git Bash, CMD. ...), but all give the same issue.
POTENTIAL FIX
Make sure that the commands are quoted and the issue should be fixed.
Example: When copy pasting the code, quoting the paths like so ....
and the app will start without issues.
Unfortunately I can't seem to find a way to edit the command run when clicking the 'Run Shiny App in Terminal' button, so I think this will need to be fixed by you.
Thanks!
PJ
The text was updated successfully, but these errors were encountered: