Closed kodecreer closed 6 months ago
Hi @kodecreer, thanks for reporting!
I cannot reproduce this as of now with the dependencies you specified on Python 3.10. That being said though, I have only tested it on Linux, but I don't think that would make a difference :eyeglasses:
Just to confirm, this is the code you're running?
from litestar import Litestar, get
@get("/")
async def hello_world() -> str:
return "Hello, world!"
app = Litestar([hello_world])
Yes that's the exact code I ran. Python version is 3.10.5
Ok found out the issue. Litestar for some reason doesn't work with Python version 3.10.5 on Mac. It's reccomended to use a different version of python . I am here if you prefer to continue investigating the cause of this issue. I updated my python version to 3.12 and it worked fine.
It's reccomended to use a different version of python
Recommended by whom? :eyes:
Is this some dependency resolution thing? If yes, how have you installed Litestar?
By me because it fixed my issue on my Mac and in case someone runs into the same issue in the future.
Probably something in the implmentation of Python on Mac. Forgot to mention it's monterey OSX I installed it using "pip install litestar[standard]"
Description
It pulls up this error when following the tutorial. This appears to be something caused by pydantic migrations for some reason?
Here is my dependancies annotated-types==0.6.0 anyio==4.3.0 certifi==2024.2.2 click==8.1.7 EditorConfig==0.12.4 exceptiongroup==1.2.0 Faker==24.9.0 fast-query-parsers==1.0.3 h11==0.14.0 httpcore==1.0.5 httptools==0.6.1 httpx==0.27.0 idna==3.7 Jinja2==3.1.3 jsbeautifier==1.15.1 litestar==2.8.2 markdown-it-py==3.0.0 MarkupSafe==2.1.5 mdurl==0.1.2 msgspec==0.18.6 multidict==6.0.5 polyfactory==2.15.0 pydantic==2.7.0 pydantic_core==2.18.1 Pygments==2.17.2 python-dateutil==2.9.0.post0 python-dotenv==1.0.1 PyYAML==6.0.1 rich==13.7.1 rich-click==1.7.4 six==1.16.0 sniffio==1.3.1 typing_extensions==4.11.0 uvicorn==0.29.0 uvloop==0.19.0 watchfiles==0.21.0 websockets==12.0
URL to code causing the issue
No response
MCVE
Steps to reproduce
Screenshots
Logs
Litestar Version
2.82
Platform