Open dorianherle opened 2 weeks ago
Same setup, same problem here
I tried the setup (Windows + VSCode) and do not run into problems.
@dorianherle could you check the network activity in the developer console of your browser (press F12). There you should see a web socket connection that does the live reloading. Maybe it is getting blocked by the Windows firewall (PyCharm added some firewall exception for me).
Hi @dorianherle, I once had a similar problem with these warnings:
WARNING: Unsupported upgrade request.
WARNING: No supported WebSocket library detected. Please use "pip install 'uvicorn[standard]'", or install 'websockets' or 'wsproto' manually.
INFO: 127.0.0.1:53315 - "GET /live-reload HTTP/1.1" 404 Not Found
After I installed websockets, the issue has disappeared and live reloading works again:
INFO: 127.0.0.1:53520 - "GET / HTTP/1.1" 200 OK
INFO: ('127.0.0.1', 53523) - "WebSocket /live-reload" [accepted]
INFO: connection open
WARNING: StatReload detected changes in '\fasthtml\fast_html_examples\untitled2.py'. Reloading...
INFO: Shutting down
Hope this helps.
I am new to FastHtml and wnted to try out the live=True, hot reload option. my code
When I run it I get:
Now when I change this line:
return fh.Div(fh.P("Hello World"))
It does not automatically quickly change the sentence on my browser but it does
And I need to refresh the page. I am using Chrome, but I have tried with other browsers, same story. Also tried to run the code from the Anaconda Terminal direclty, same story.