Demo of PyCharm bug PY-50507
https://youtrack.jetbrains.com/issue/PY-50507
- Clone this repo locally
- Run
make setup
to create a virtualenv and install uvicorn - Install standard uvicorn dependencies with
pip install uvicorn[standard]
If you getModuleNotFoundError: No module named 'asgiref'
then this is the problem. - Run this demo app with either
make run
, oruvicorn example:app
, or clicking Run in PyCharm on theuvicorn
app defined in the.run
directory. - If the service runs successfully you should see
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
- Click the link (or open the address manually) to confirm the service serves the expected "Hello, world!" response.
- Stop the app and instead run the Profiler within PyCharm on the app
- Observe error:
AttributeError: partially initialized module 'logging' has no attribute 'Formatter' (most likely due to a circular import)