Can't import asyncio

Hey!

I am having an absolute blast using this amazing framewok, but in my latest deploy I get this really off putting error message. All my code works absolute fine locally, but in my deployment things get shifty.

Error code:
/var/task/asyncio/init.py

21

from .base_events import *

^ SyntaxError invalid syntax (base_events.py, line 296)

/var/task/handler.py

4

import asyncio

<frozen importlib._bootstrap>

219

<frozen importlib._bootstrap_external>

783

<frozen importlib._bootstrap>

671

<frozen importlib._bootstrap>

975

<frozen importlib._bootstrap>

991

<frozen importlib._bootstrap>

1014

/var/lang/lib/python3.8/importlib/__init__.py

127

return _bootstrap._gcd_import(name[level:], package, level)

/var/task/serverless_sdk/__init__.py

56

user_module = import_module(user_module_name)

/var/task/s_rateHandler.py

20

user_handler = serverless_sdk.get_user_handler('handler.run')

/var/task/s_rateHandler.py

25

raise e

/var/task/serverless_sdk/__init__.py

144

return user_handler(event, context)

/var/task/serverless_sdk/__init__.py

456

yield

Error code:
05:26:49 pm
START RequestId: 664513d5-4dbc-411f-8e22-d81d5e73b51e Version: $LATEST
05:26:49 pm
[ERROR] SyntaxError: invalid syntax (base_events.py, line 296) Traceback (most recent call last): File “/var/task/serverless_sdk/init.py”, line 144, in wrapped_handler return user_handler(event, context) File “/var/task/s_rateHandler.py”, line 25, in error_handler raise e File “/var/task/s_rateHandler.py”, line 20, in user_handler = serverless_sdk.get_user_handler(‘handler.run’) File “/var/task/serverless_sdk/init.py”, line 56, in get_user_handler user_module = import_module(user_module_name) File “/var/lang/lib/python3.8/importlib/init.py”, line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “”, line 1014, in _gcd_import File “”, line 991, in _find_and_load File “”, line 975, in _find_and_load_unlocked File “”, line 671, in _load_unlocked File “”, line 783, in exec_module File “”, line 219, in _call_with_frames_removed File “/var/task/handler.py”, line 4, in import asyncio File “/var/task/asyncio/init.py”, line 21, in from .base_events import *

Does anyone have any idea what could be the problem?

I figured it out. If anyone has the same problem:

I did a major oopsie and didn’t realise that Asyncio is now a part of Python. So by uninstalling asyncio and removing it from requirements.txt I could get it going.