Sony PRSA-CL10B: review

I’ve recently bought Sony Reader PRS-T1. Excellent reader, rest assured of that. But cover is a must-have for such a thing, so I chose Sony PRSA-CL10B. “Let it be light!”, I thought. Oh yes, there is. The problem is that the cover is crappy by itself.

  • It is soft: sags easily down to screen itself

  • It lacks any lock: can’t be fixed in neither opened nor closed state; no press stud or magnet or anything, cover is more or less loose

  • It’s bloody expensive (more than 40% of Reader price); considering aforementioned points, I’d call this ridiculous

I’m just glad I haven’t decided to buy “light-less” (a bit cheaper) version of that cover, because LED light is the only thing I like about it. Oh, and the Reader is great. Just choose cover wisely, remembering what I wrote here.

Flask sessions and unicode_literals

If you had tried to use Flask sessions and got something like that:

File "/usr/lib64/python2.7/site-packages/flask/app.py", line 889, in __call__
  return self.wsgi_app(environ, start_response)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 871, in wsgi_app
  with self.request_context(environ):
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 836, in request_context
  return _RequestContext(self, environ)
File "/usr/lib64/python2.7/site-packages/flask/ctx.py", line 33, in __init__
  self.session = app.open_session(self.request)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 431, in open_session
  secret_key=key)
File "/usr/lib64/python2.7/site-packages/werkzeug/contrib/securecookie.py", line 308, in load_cookie
  return cls.unserialize(data, secret_key)
File "/usr/lib64/python2.7/site-packages/werkzeug/contrib/securecookie.py", line 255, in unserialize
  mac = hmac(secret_key, None, cls.hash_method)
File "/usr/lib64/python2.7/hmac.py", line 133, in new
  return HMAC(key, msg, digestmod)
File "/usr/lib64/python2.7/hmac.py", line 72, in __init__
  self.outer.update(key.translate(trans_5C))

…you might be obscured. Fear not! The reason may lurk in

from __future__ import unicode_literals

Just declare your SECRET_KEY as a bytes object and get happy again!

SECRET_KEY = b'smthverrysekret'