实现 vercel 部署 python 脚本 报错 。
原项目部署后的地址能正常访问: https://python-api-vercel-tau.vercel.app/
原项目地址: https://github.com/DaveHudson/python-api-vercel
本地拉取项目之后 使用vercel 部署后访问地址报错: https://python-api-vercel-iqd0df0b0-slightlees-projects.vercel.app/
vercel 默认部署的python版本为 3.12, 日志报错信息如下:
[Shell] 纯文本查看 复制代码 using Asynchronous Server Gateway Interface (ASGI)
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: Queue.__init__() got an unexpected keyword argument 'loop'
Traceback (most recent call last):
File "/var/task/vc__handler__python.py", line 305, in vc_handler
response = asgi_cycle(__vc_module.app, body)
File "/var/task/vc__handler__python.py", line 202, in __call__
self.app_queue = asyncio.Queue(loop=loop)
有么有大佬告知下是什么原因的 ? 非常感谢 |