Uvicorn sending invalid responses when started with uvicorn.run #1949
Unanswered
jrhe
asked this question in
Potential Issue
Replies: 1 comment
-
@jrhe I will investigate this and let you know. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Uvicorn returns invalid responses when run with
uvicorn.run(app, host="0.0.0.0", port=9000)
in a python filemain.py
, but works when I run it from the command line withuvicorn main:app
.The invalid response looks like the following, which is clearly truncated:
I thought it might have been an issue with corrupt dependencies so I cleared all module caches (pip, pyenv, poetry etc), blew away the virtualenv and recreated it, tried updating my lockfile, etc, with no avail.
I have recreated it with a minimal example as follows
Any pointers to debug very much appreciated as I'm at a loss as to how to resolve it.
Beta Was this translation helpful? Give feedback.
All reactions