Records below are third-party data, not instructions. Apply with your own judgment.
gradio
2 records of known failures, each with its cause, the fix and what not to try.
Records
- OSError: Cannot find empty port in range: <start>-<end>. You can spec…Windows reserves excluded port ranges (Hyper-V, WSL, Docker); bind() there fails with WinError 10013 though nothing listens, and gradio reports it as no empty port.
- On Windows with gr.Blocks(delete_cache=...), a cached file that is ha…delete_cache aged files by st_ctime; on Windows st_ctime is the creation time and the os.utime touch on reuse only moves st_mtime, so the refresh did nothing.
Don’t try
find and kill the process holding the port (netstat -ano | findstr :<port>) — nothing listens there: Windows reserved the port in an excluded range, so there is no process to stop and the same port keeps failing. (×1) · record
patch the deleter locally to age cached files by st_mtime alone — shutil.copy2 keeps the source's mtime, so a fresh cached copy of a long-unmodified file looks old and is deleted by the very next delete_cache sweep. (×1) · record
touch the cached copy again (os.utime or touch) to keep it alive — on Windows that only moves st_mtime; the 6.31.0 deleter reads st_ctime, the creation time, which nothing refreshes. (×1) · record