librelist archives

« back to archive

Flask + Flask-Login == TypeError?

Flask + Flask-Login == TypeError?

2012-11-10 @ 19:14
I am newbie in Flask. I try to create test application with admin page. 
It’s all works perfectly except admin login page.
I set app.config['SECRET_KEY'] and app.config['SERVER_NAME'] but...
When I check http://flask.tark:5000/admin/ I get this error:

TypeError: character mapping must return integer, None or unicode
Traceback (most recent call last)
File "F:\Python\lib\site-packages\flask\", line 1701, in __call__
return self.wsgi_app(environ, start_response)
File "F:\Python\lib\site-packages\flask\", line 1685, in wsgi_app
with self.request_context(environ):
File "F:\Python\lib\site-packages\flask\", line 274, in __enter__
File "F:\Python\lib\site-packages\flask\", line 238, in push
self.session =
File "F:\Python\lib\site-packages\flask\", line 792, in open_session
return self.session_interface.open_session(self, request)
File "F:\Python\lib\site-packages\flask\", line 191, in open_session
File "F:\Python\lib\site-packages\werkzeug\contrib\", line 
312, in load_cookie
return cls.unserialize(data, secret_key)
File "F:\Python\lib\site-packages\werkzeug\contrib\", line 
259, in unserialize
mac = hmac(secret_key, None, cls.hash_method)
File "F:\Python\lib\", line 133, in new
return HMAC(key, msg, digestmod)
File "F:\Python\lib\", line 72, in __init__
TypeError: character mapping must return integer, None or unicode

If I don’t use session, I get 404. If use – error.
What, what, what is wrong with this??? (application) -
helpers/ - - -