Uvicorn fails "quietly" upon a circular import error #2034
-
From this comment and discussion. When there is a circular import in the app, uvicorn reports # main.py
from bar import Bar
class Foo:
pass
async def app(scope, receive, send):
assert scope['type'] == 'http' #bar.py
from main import Foo
class Bar:
pass Running with
only results in
whereas running
reports the far more useful
Not sure how you'd start debugging this one I'm afraid - or if its even a "bug". For comparison syntax errors are reported correctly. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello, Could you please suggest me on this ( Kafka FAST API) ##########main.py ################################ app = FastAPI() @app.get("/") error : |
Beta Was this translation helpful? Give feedback.
Thanks.
#2035