-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Python runtime does not work on Python 3.12 with ASGI #11545
Comments
I encountered the same issue @kytta I, temporarily, solved my issue by downgrading to python 3.9. |
Could you please provide an example of {
"builds": [
{
"src": "main.py",
"use": "@vercel/python",
"config": {
"legacy": true
}
}
],
"routes": [
{
"src": "/(.*)",
"dest": "main.py"
}
]
} |
There is nothing wrong with your config. Also, the config field in the builds object is unnecessary. To tell vercel to pick up the correct version of python, you need to add the "Pipfile" and "Pipfile.lock" My vercel.json config file looks like:
My pipfile looks like:
Check the following links out for more info: |
There is a pull request which solves the problem - #11541 |
yes, but while its not live, the solution should be made clear to the users |
I also hit this issue - would really like to avoid downgrading both node and python - any idea when the associated PR will be merged and released? |
Same problem, waiting for the PR to be accepted |
+1 FastAPI does not work until this is fixed. |
Also need to set node version to 18.x in package.json using the code below
|
I would say, switch to flask. Sanic won't work either since its an async framework like FastAPI. If you can't change the code, I suggest using render.com then because clearly Vercel don't have time for the python community.
I actually didn't have to do this, it worked just from changing the setting from the vercel dashboard in the project settings. |
Closed via #11675 |
Although Python 3.12 is listed as supported by Vercel, it does not work properly with asynchronous functions.
I am trying to deploy a Starlette app (which is ASGI). Just listing Starlette as dependency did not work, as Vercel complained that it's missing
aiohttp
:So, I've added it to the dependencies (although I don't see the point in it). Nevertheless, it now fails with a different error:
I could trace back to this line of
vc_init
:vercel/packages/python/vc_init.py
Line 202 in 3101d24
According to the Python docs, the
loop
argument to theQueue
was removed in Python 3.10The text was updated successfully, but these errors were encountered: