Vercel FastAPI: Diese serverlose Funktion ist abgestürzt [geschlossen]Python

Python-Programme
Anonymous
 Vercel FastAPI: Diese serverlose Funktion ist abgestürzt [geschlossen]

Post by Anonymous »

Ich habe die FastAPI auf Vercel bereitgestellt, aber beim Erreichen des Endpunkts schlägt sie fehl
Ich habe unten vercel.json und Fehlerprotokolle eingefügt
Unten finden Sie die vercel.json-Konfiguration

Code: Select all

{
"version": 2,
"functions": {
"api/index.py": {
"runtime": "@vercel/[email protected]"
}
},
"routes": [
{
"handle": "filesystem"
},
{
"src": "/api/.*",
"dest": "/api/index.py"
},
{
"src": "/(.*)",
"dest": "/public/$1"
}
],
"env": {
"PYTHONUNBUFFERED": "1"
}
}
Unten finden Sie das auf Vercel generierte Protokoll

Code: Select all

[WARNING]   2025-10-22T08:53:37.387Z        LAMBDA_WARNING: Unhandled exception. The most likely cause is an issue in the function code. However, in rare cases, a Lambda runtime update can cause unexpected function behavior. For functions using managed runtimes, runtime updates can be triggered by a function change, or can be applied automatically. To determine if the runtime has been updated, check the runtime version in the INIT_START log entry. If this error correlates with a change in the runtime version, you may be able to mitigate this error by temporarily rolling back to the previous runtime version. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html
[ERROR] TypeError: issubclass() arg 1 must be a class
Traceback (most recent call last):
File "/var/lang/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 999, in exec_module
File "", line 488, in _call_with_frames_removed
File "/var/task/vc__handler__python.py", line 32, in 
if not issubclass(base, BaseHTTPRequestHandler):

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post