Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Error : KeyError: 'WERKZEUG_SERVER_FD' #243

Closed
gene1wood opened this issue Apr 12, 2022 · 2 comments · Fixed by #244
Closed

Error : KeyError: 'WERKZEUG_SERVER_FD' #243

gene1wood opened this issue Apr 12, 2022 · 2 comments · Fixed by #244

Comments

@gene1wood
Copy link
Contributor

gene1wood commented Apr 12, 2022

This line in maws

os.environ["WERKZEUG_RUN_MAIN"] = "true"

appears to be triggering this issue pallets/werkzeug#2368

We're setting os.environ["WERKZEUG_RUN_MAIN"] = "true" in order to suppress the printing to the console of Flask information (as mentioned in cs01/gdbgui#425 (comment) )

The workaround for the moment appears to be downgrading werkzeug pip install 'Werkzeug<2.1.0'

@hwine
Copy link

hwine commented Apr 12, 2022

Should we also be pinning all the requirements? Especially if maws is installable via pipx, pinning would be a good thing.

gene1wood added a commit to gene1wood/mozilla-aws-cli that referenced this issue Apr 13, 2022
This fixes a onflict with Werkzeug version 2.1.0 and newer which caused a
`KeyError: 'WERKZEUG_SERVER_FD'`.
This fix limits the max version of Werkzeug. A more permanent fix will be to
move away from using the Flask development server to another WSGI listener.
Fixes mozilla-iam#243
@gene1wood
Copy link
Contributor Author

Should we also be pinning all the requirements? Especially if maws is installable via pipx, pinning would be a good thing.

Ya, that would probably be good. I'd say open an issue or PR that change.

This fix is deployed and available in mozilla-aws-cli==1.2.5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants