Open edgararuiz opened 3 months ago
Ah, thanks for bringing this up! 🙌 I don't believe this is a Positron-specific bug, it is happening since asyncio by default doesn't allow for nested events, eg, starting Shiny app inside a Console process. Generally you would run shiny run ...
in the Terminal instead or use the Shiny extension to run app. I don't think you would be able to run this in a Jupyter Notebook either.
On the Positron side, we might want to think how to handle apps running from the console, if we could give a nudge to use some sort of App Builder experience. There is a way to nest asyncio with the aptly named nest-asyncio
, but the project has been archived on GitHub (as of 2024)/I'm not sure what other side effects would occur, so I would be hesitant to go down that path.
System details:
Apple M3 - Sonoma 14.5
Positron and OS details:
Positron Version: 2024.08.0 (Universal) build 48 Code - OSS Version: 1.91.0 Commit: ed616b36655fb24d116108bdd833f1321704315b Date: 2024-08-19T04:26:51.868Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0
Interpreter details:
Python 3.12
Describe the issue:
When trying to run
shiny.run_app()
I get the following error:I have copied the full error below.
Steps to reproduce the issue:
Create a simple
app.py
fileIn the Python console run:
Expected or desired behavior:
The Shiny app to run in the Viewer pane
Full error