Open markotitel opened 4 years ago
I've tried to find help on Reditt Python sub before posting an issue here. I have a simple lambda function where I need to use Pendulum package.
import pendulum def lambda_handler(event, context): print(pendulum.now())
The error I get is "errorMessage": "module 'pendulum' has no attribute 'now'"
"errorMessage": "module 'pendulum' has no attribute 'now'"
This code works fine locally.
import pendulum print(pendulum.now())
I've tried to do maximum debugging I knew. These are the results of it. Locally:
import pendulum print(pendulum) OUTPUT: <module 'pendulum' from '/path/archive_date/.package/pendulum/__init__.py'>
On Lambda output is: OUTPUT: <module 'pendulum' (namespace)>
OUTPUT: <module 'pendulum' (namespace)>
I still guess that I am doing something wrong here.
I've just seen this on a Raspberry Pi and got round it with this:
$ pip install --no-binary=pendulum pendulum
Issue
I've tried to find help on Reditt Python sub before posting an issue here. I have a simple lambda function where I need to use Pendulum package.
The error I get is
"errorMessage": "module 'pendulum' has no attribute 'now'"
This code works fine locally.
I've tried to do maximum debugging I knew. These are the results of it. Locally:
On Lambda output is:
OUTPUT: <module 'pendulum' (namespace)>
I still guess that I am doing something wrong here.