Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start uvicorn with newly generated app #5

Open
svanschalkwyk opened this issue Feb 3, 2022 · 0 comments
Open

Cannot start uvicorn with newly generated app #5

svanschalkwyk opened this issue Feb 3, 2022 · 0 comments

Comments

@svanschalkwyk
Copy link

Python 3.9 clean install
Ubuntu 21.04
Paths redacted for clarity
Uvicorn works for a simple app

Traceback (most recent call last):
  File ".../main.py", line 2, in <module>
    from app.api import app
  File ".../app/api.py", line 15, in <module>
    from app.models import (
  File ".../app/models.py", line 44, in <module>
    class RecordDataResponse(BaseModel):
  File ".../.venv/lib/python3.9/site-packages/pydantic/main.py", line 212, in __new__
    fields[ann_name] = Field.infer(
  File ".../.venv/lib/python3.9/site-packages/pydantic/fields.py", line 145, in infer
    return cls(
  File ".../.venv/lib/python3.9/site-packages/pydantic/fields.py", line 122, in __init__
    self.prepare()
  File ".../.venv/lib/python3.9/site-packages/pydantic/fields.py", line 187, in prepare
    self._populate_sub_fields()
  File ".../.venv/lib/python3.9/site-packages/pydantic/fields.py", line 243, in _populate_sub_fields
    self.type_ = self.type_.__args__[0]  # type: ignore
  File "/usr/lib/python3.9/typing.py", line 706, in __getattr__
    raise AttributeError(attr)
AttributeError: __args__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant