Uvicorn does not work with profiler in pycharm #2283
Unanswered
ryanisn
asked this question in
Potential Issue
Replies: 1 comment
-
Instead of executing the service with the command uvicorn, you need add this code at the end of the API: if __name__ == '__main__':
import uvicorn
uvicorn.run(app) And execute as normal py program while your do the profile. |
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
-
This issue has been reported by many people in this thread https://youtrack.jetbrains.com/issue/PY-50507
I'm not confident to say which party should fix this issue, but it does look like
import logging
in alogging.py
would create circular import under certain circumstanceuvicorn/uvicorn/logging.py
Line 4 in a2219eb
Beta Was this translation helpful? Give feedback.
All reactions