serverless-wsgi: Werkzeug updated. Getting errors

On Werkzeug 2.0, getting error:

[ERROR] Runtime.ImportModuleError: Unable to import module 'wsgi_handler': No module named 'werkzeug._compat' Traceback (most recent call last):

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 19
  • Comments: 17 (5 by maintainers)

Most upvoted comments

I don’t think pinning it is a solution, atleast not for me. I’m trying to use latest flask (2.0.1), but with werkzeug pinned I get the following error:

The conflict is caused by:
    The user requested werkzeug==1.0.1
    The user requested werkzeug==1.0.1
    flask 2.0.0 depends on Werkzeug>=2.0

Makes sense since flask >= 2.0.0 requires newer Werkzeug. This now leaves me having to run old flask as well as werkzeug and probally other stuff over time.

Thanks for pointing it out, I missed that PR. Will merge and release asap

I think it makes sense to drop the python 2 support

Yeah, thanks. I forgot to update the serverless-wsgi in the package.json.

My bad

Hi, I am currently having this error. Is downgrading the only way to go?

No, it has been fixed. Upgrade werkzeug to >2 and serverless-wsgi to latest version and they work just fine!

Yes, werkzeug<2.0.0 worked for me. I was just mentioning that the problem exists for Python3 as well. So that newer versions of the library can fix this issue.

I had to downgrade my Flask version as well to accommodate this change.