werkzeug: Werkzeug 0.11 with Flask 0.10.1 and 'app.debug = True' won't start.
I wrote the following test script to demonstrate the issue
import flask
app = flask.Flask(__name__)
@app.route("/")
def helloWorld():
return "Hello world!"
app.debug = True
app.run()
Running it with Flask 0.10.1 and Werkzeug 0.11 raises this error
Traceback (most recent call last):
File "flask-test", line 10, in <module>
app.run()
File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 772, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python3.4/dist-packages/werkzeug/serving.py", line 633, in run_simple
application = DebuggedApplication(application, use_evalex)
File "/usr/local/lib/python3.4/dist-packages/werkzeug/debug/__init__.py", line 169, in __init__
if self.pin is None:
File "/usr/local/lib/python3.4/dist-packages/werkzeug/debug/__init__.py", line 179, in _get_pin
self._pin, self._pin_cookie = get_pin_and_cookie_name(self.app)
File "/usr/local/lib/python3.4/dist-packages/werkzeug/debug/__init__.py", line 96, in get_pin_and_cookie_name
h.update('cookiesalt')
TypeError: Unicode-objects must be encoded before hashing
If I downgrade Werkzeug to 0.10.4, it runs without a hitch. However, I can make this run with Werkzeug 0.11 if I remove the app.debug = True.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 16 (3 by maintainers)
Commits related to this issue
- Encode a string to utf-8 Fixes #798 — committed to KillerX/werkzeug by KillerX 9 years ago
- FIX: Use werkzeug 0.10.x otherwise tileser is broken under python3.5 when -dd is specified, see: https://github.com/mitsuhiko/werkzeug/issues/798 — committed to Kotaimen/stonemason by Kotaimen 9 years ago
- Merge branch 'develop' of github.com:Kotaimen/stonemason into develop # By Kotaimen (5) and Qcho (1) # Via GlieseRay (1) and Qcho (1) * 'develop' of github.com:Kotaimen/stonemason: future releases ... — committed to Kotaimen/stonemason by GlieseRay 9 years ago
- Allow versions >= 0.11.1 of werkzeug Werkzeug not starting in debug mode has been resolved. See: mitsuhiko/werkzeug#798 — committed to ollien/timpani by ollien 9 years ago
- Allow versions >= 0.11.1 of werkzeug Werkzeug not starting in debug mode has been resolved. See: mitsuhiko/werkzeug#798 — committed to ollien/timpani by ollien 9 years ago
- Force Werkzeug update for this bug: https://github.com/mitsuhiko/werkzeug/issues/798 — committed to pdonorio/dockerizing by deleted user 9 years ago
- CHORE: Bump up Werkzeug requirements since https://github.com/mitsuhiko/werkzeug/issues/798 is fixed in 0.11.1 — committed to Kotaimen/stonemason by Kotaimen 9 years ago
@jscholes We recently pushed a release that fixes an almost identical bug. Could you post the full traceback in a new issue? Thanks!