Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Migrated] zappa package with slim_handler=true doesn't include Werkzeug package (introduced v0.46.0) #597

Closed
jneves opened this issue Feb 20, 2021 · 2 comments
Labels
auto-closed [Bot] Closed, details in comments no-activity [Bot] Closing soon if no new activity

Comments

@jneves
Copy link
Contributor

jneves commented Feb 20, 2021

Originally from: Miserlou/Zappa#1547 by sheats

Context

I thought I was running into issue #64 but turns out I found a regression introduced in v0.46 related to how the handler_venv is packaged and uploaded when using slim_handler.

I created a small repo to show the problem: https://github.com/sheats/zappa_issue
If you keep zappa==0.46.0 (or 0.46.1) in requirements.txt and deploy the function the only thing that prints in the logs is:

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

If you change requirements.txt to zappa==0.45.1 and update the function the problem goes away.

When I unzipped the handler venv zip after running zappa package I only see the following:

drwx------   9 user  staff    288 Jun 25 06:27 .
drwxr-xr-x  16 user  staff    512 Jun 25 06:27 ..
-rwxr-xr-x   1 user  staff      0 Jun 25  2018 __init__.py
-rw-------@  1 user  staff  85824 Dec 31  1979 _sqlite3.so
-rw-r--r--   1 user  staff    605 Sep 13  2016 django_zappa_app.py
-rw-------   1 user  staff  23461 Dec 31  1979 handler.py
-rw-------   1 user  staff    143 Dec 31  1979 package_info.json
drwxr-xr-x  14 user  staff    448 Jun 25 06:27 zappa
-rw-r--r--   1 user  staff    467 Jun 25  2018 zappa_settings.py

Expected Behavior

I expect the logs to show other errors or normal successful logs.

Actual Behavior

handler.py tries to import werkzeug on line 17 but fails because Werkzeug wasn't included in the handler_venv zipped package.

Possible Fix

Don't know the code well enough to come up with a fix strategy yet.

Steps to Reproduce

git clone [email protected]:sheats/zappa_issue.git
make reproduce && make tail

Your Environment

Everything is in the repo I referenced.

Copy link

github-actions bot commented Apr 3, 2024

Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.

@github-actions github-actions bot added the no-activity [Bot] Closing soon if no new activity label Apr 3, 2024
Copy link

Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.

@github-actions github-actions bot added the auto-closed [Bot] Closed, details in comments label Apr 13, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-closed [Bot] Closed, details in comments no-activity [Bot] Closing soon if no new activity
Projects
None yet
Development

No branches or pull requests

1 participant