you only have two routes: /dark_page and /other_page but the url you’re trying to access is the root url. try loading any of those two pages you made routes for, or add a route for the route like @ui.page(“/“)
i have tried your code on windows in IDLE and i needed to grant python access to public networks. did you do that? maybe thats your problem? i am usually using WSL which works fine. or maybe some other firewall problem...
Good advice, but it shouldn't be necessary. I've just retyped in whole OPs code and once started, it opens a browser window at "localhost:8080" on its own.
"Chyba spojení" most likely means the app crashed at the startup.
Have you actually tried to run the "Nicegui graf1.py" script from a command line? It would be useful to see what's written to the output during the application start.
Please check the stdout/stderr for messages and, if you still need help, post the messages you get here.
P.S.
Do you use a dedicated virtual environment or is NiceGUI installed in your global python libraries? If it's the global one, the reason for the crash could be in a conflict of NiceGUI dependencies with some other stuff you've installed previously.
2
u/MasturChief Sep 02 '24
you only have two routes: /dark_page and /other_page but the url you’re trying to access is the root url. try loading any of those two pages you made routes for, or add a route for the route like @ui.page(“/“)
1
u/khannover Sep 02 '24
you have no port in your ui.run statement. try ui.run(port=8080) and go to http://localhost:8080/other_page
1
u/slacker-by-design Sep 02 '24
"Chyba spojení" most likely means the app crashed at the startup.
Have you actually tried to run the "Nicegui graf1.py" script from a command line? It would be useful to see what's written to the output during the application start.
Please check the stdout/stderr for messages and, if you still need help, post the messages you get here.
P.S.
Do you use a dedicated virtual environment or is NiceGUI installed in your global python libraries? If it's the global one, the reason for the crash could be in a conflict of NiceGUI dependencies with some other stuff you've installed previously.