Zappa: Unable to import module 'handler': No module named werkzeug.wrappers
I tried installing Werkzeug but it seems like it is already installed
~/dev/testzappa% sudo pip install Werkzeug Requirement already satisfied (use --upgrade to upgrade): Werkzeug in /usr/lib/python2.7/site-packages
I guess it isn’t packaged into the lambda.
I get the following error in my lambda cloudwatch logs
Unable to import module 'handler': No module named werkzeug.wrappers
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 34 (3 by maintainers)
Make sure you run
pip install zappaandpip install flaskAFTER creating and activating your virtual environment (runningvirtualenv venvandsource venv/bin/activate). This fixed the error for me.Same issue, I’m trying to use slim_handler = True for my flask-ask skill but I get the same error message. Really hope they fix this soon!
This happens to me with
slim_handler=True. I wonder if this is causing the issue https://github.com/uiri/toml/issues/129When the handler venv pip install tries to happen it tries to install toml==0.9.3 but it can’t find it. Maybe we could ask toml to bump their version.
I asked the maintainer to cut a new release in that issue. It seems weird stuff is happening because v0.9.3.1 on pypi still references itself as 0.9.3 in code. So if this is the problem we either wait for upstream or temporarily downgrade to 0.9.2 😕
@Sniedes722 Downgrading to 0.44.3 fixed the issue for me.
toml has released 0.9.4
I think this issue is actually this issue (#63). Can you rename your virtualenv to env (or probably anything that isnt the same name as your project) and see what happens?