Skip to content

Pydantic 2.10, Python 3.11, FastUI 0.6.0 causes typing errors  #33

@jordaant

Description

@jordaant

Hi there,

This should be a basic question but I'm stumped. With the basic Hello World code, I get

pydantic.errors.PydanticUserError: TypeAdapter[typing.Annotated[fastui.FastUI, FieldInfo(annotation=FastUI, required=True)]] is not fully defined; you should define typing.Annotated[fastui.FastUI, FieldInfo(annotation=FastUI, required=True)] and all referenced types, then call .rebuild() on the instance.

This is the same UsageError I am seeing on my own code, and on code copied & pasted from the FastUI readme example app. This occurs with FastUI 0.6.0 and 0.7.0.

I am running this in a Pycharm project, 3.11 venv from Homebrew install. Is there something non-obvious I should check, that might fix this? pip freeze:

annotated-types==0.7.0
anyio==4.6.2.post1
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.4.0
click==8.1.7
cryptography==44.0.0
Deprecated==1.2.15
dnspython==2.7.0
email_validator==2.2.0
exceptiongroup==1.2.2
fastapi==0.115.6
fastapi-cli==0.0.6
fastui==0.6.0
h11==0.14.0
httpcore==1.0.7
httptools==0.6.4
httpx==0.28.1
idna==3.10
Jinja2==3.1.4
markdown-it-py==3.0.0
MarkupSafe==3.0.2
mdurl==0.1.2
pycparser==2.22
pydantic==2.10.3
pydantic_core==2.27.1
PyGithub==2.5.0
Pygments==2.18.0
PyJWT==2.10.1
PyNaCl==1.5.0
python-dotenv==1.0.1
python-multipart==0.0.19
PyYAML==6.0.2
requests==2.32.3
rich==13.9.4
rich-toolkit==0.12.0
shellingham==1.5.4
sniffio==1.3.1
starlette==0.41.3
typer==0.15.1
typing_extensions==4.12.2
urllib3==2.2.3
uvicorn==0.32.1
uvloop==0.21.0
watchfiles==1.0.0
websockets==14.1
wrapt==1.17.0

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions