Hosting a python server in Vercel

Very thankful for the example and made my flask deployment process a lot easier. However, I started facing a lot of issues with package management…

When I went into the logs to check, the message is only limited to around 800 characters. Most of this message shows irrelevant information about AWS Lambda itself. If there could be a longer message in Vercel logs, that would’ve helped me a lot!

Example of something I was facing due to an outdated python package:
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 Managing Lambda runtime version updates - AWS Lambda
[ERROR] Runtime.ImportModuleError: Unable to import module ‘vc__handler__python’: cannot import name ‘Mapping’ from ‘collections’ (/var/lang/lib/python3.12/collections/init.py)
Traceback (most recent call last):

Hi @anshroy2!

I’m glad that the example has helped you deploy your app quicker :smile:

Could you give me a bit more information on where you’re seeing this error? From the message, it looks like an issue with an outdated Python package. Can you make sure everything is up-to-date?