bitfede
bitfede

Reputation: 52

peewee problem: No module named 'playhouse' when deploying using AWS Chalice

I am working on an AWS Chalice project, and I chose peewee as the ORM for the DB we have.

When I run things locally with chalice local I can run my api with no problem, I'm able to CRUD normally.

When I deploy my microservice using chalice deploy and I go test it out on the live url, I encounter an error 500. When looking into the logs I see this message multiple times:

Traceback (most recent call last):
2023-01-03 22:39:57.665000 s98frt [ERROR] Runtime.ImportModuleError: Unable to import module 'app': No module named 'playhouse'

I cannot do poetry add playhouse, because I get the following error: Could not find a matching version of package playhouse. Strange because playhouse comes with peewee.

What can you suggest me to do to fix this?

Thank you so much

Upvotes: 1

Views: 1315

Answers (1)

ddtraveller
ddtraveller

Reputation: 1232

Take a look at your requirements.txt and make sure it has ==ver. ex:

peewee==3.17.1

Upvotes: 0

Related Questions