Windows 10: Reload hangs on "detected changes" when launched in child terminal until terminal is in foreground / focussed #2582
Unanswered
tom-a-horrocks
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've discovered a strange bug in Windows 10 that I've reproduced over different PCs and multiple versions of uvicorn. If I run uvicorn on a child terminal using either of the commands below, then reload hangs on "WARNING: WatchFiles detected changes in 'main.py'. Reloading...". The reload progresses only after clicking somewhere on the terminal (bringing it into the foreground / focussed).
This issue only occurs when running uvicorn in a child terminal; running it directly via
uvicorn main:app --host 0.0.0.0 --port 8001 --reload
is fine. The reason I'm launching in a separate window is so I can use one script to set up my dev runtime environment (but would be very happy to hear an alternative!).At a guess, this might be related to #2292.
Command to reproduce
Start-Process powershell { uvicorn main:app --host 0.0.0.0 --port 8001 --reload }
or
powershell -Command "uvicorn main:app --host 0.0.0.0 --port 8001 --reload"
Version
Running uvicorn 0.34.0 with CPython 3.12.8 on Windows
Beta Was this translation helpful? Give feedback.
All reactions