Created
December 26, 2022 11:18
-
-
Save lsmith77/83d7ffa0377c7e206f818d736da6423b to your computer and use it in GitHub Desktop.
AttributeError: 'LazyEval' object has no attribute 'lazy_self' and unable to get the uvicorn server up to complete profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ fastapi pipenv run blackfire-python uvicorn main:app --reload | |
INFO: Will watch for changes in these directories: ['/Users/lsmith/htdocs/fastapi'] | |
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) | |
INFO: Started reloader process [13158] using StatReload | |
Traceback (most recent call last): | |
File "/Users/lsmith/.local/share/virtualenvs/fastapi-iILkAJ4S/lib/python3.11/site-packages/srsly/ruamel_yaml/util.py", line 42, in __getattribute__ | |
lazy_self = object.__getattribute__(self, 'lazy_self') | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
AttributeError: 'LazyEval' object has no attribute 'lazy_self' | |
Traceback (most recent call last): | |
File "/Users/lsmith/.local/share/virtualenvs/fastapi-iILkAJ4S/lib/python3.11/site-packages/srsly/ruamel_yaml/util.py", line 42, in __getattribute__ | |
lazy_self = object.__getattribute__(self, 'lazy_self') | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
AttributeError: 'LazyEval' object has no attribute 'lazy_self' | |
Traceback (most recent call last): | |
File "/Users/lsmith/.local/share/virtualenvs/fastapi-iILkAJ4S/lib/python3.11/site-packages/srsly/ruamel_yaml/util.py", line 42, in __getattribute__ | |
lazy_self = object.__getattribute__(self, 'lazy_self') | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
AttributeError: 'LazyEval' object has no attribute 'lazy_self' | |
Traceback (most recent call last): | |
File "/Users/lsmith/.local/share/virtualenvs/fastapi-iILkAJ4S/lib/python3.11/site-packages/srsly/ruamel_yaml/util.py", line 42, in __getattribute__ | |
lazy_self = object.__getattribute__(self, 'lazy_self') | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
AttributeError: 'LazyEval' object has no attribute 'lazy_self' | |
Traceback (most recent call last): | |
File "/Users/lsmith/.local/share/virtualenvs/fastapi-iILkAJ4S/lib/python3.11/site-packages/srsly/ruamel_yaml/util.py", line 42, in __getattribute__ | |
lazy_self = object.__getattribute__(self, 'lazy_self') | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
AttributeError: 'LazyEval' object has no attribute 'lazy_self' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastapi import FastAPI | |
from blackfire import probe | |
probe.initialize() | |
probe.enable() | |
from spacy.tokens import Doc | |
app = FastAPI() | |
probe.end() | |
@app.get("/") | |
async def root(): | |
return {"message": "Hello World"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[source]] | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[packages] | |
fastapi = "*" | |
uvicorn = "*" | |
blackfire = "*" | |
spacy = "*" | |
[dev-packages] | |
[requires] | |
python_version = "3.11" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment