0

There are other similar question like mine, but I think no one looks complete or fits/answer my case.

I'm deploying a Python 3.6 application on AWS lambda via serverless framework.

With this application I'm using diskcache to perform some small file caching (not using at all sqlite actually)

I'm using "serverless-python-requirements" plugin in order to have all my dependencies (defined in requirements.txt file) packed up and uploaded (diskcache in this case)

When application is live on AWS and I request it, I'll get back a 500 error. And in my logs I can read:

  Unable to import module 'handler': No module named '_sqlite3'

Then from answer below I get that sqlite module should not be needed to be installed. Python: sqlite no matching distribution found for sqlite

So no need (and it wont work) to add sqlite as a requirement...

Then I wonder why AWS lambda is unable to find sqlite once deployed.

Any hint pls?

Thanks

koalaok
  • 5,075
  • 11
  • 47
  • 91
  • are you sure you have the name of the module correct? You have `_sqlite3` in the error message. Shouldnt it be `import sqlite3 ` ? – GWed Oct 29 '18 at 13:35
  • I'm not importing directly sqlite3 but diskcache. I suppose it's importing sqlite3 behind the scenes... – koalaok Oct 29 '18 at 13:53

0 Answers0