title: Internal Server Error when using Flask session
body: <p>I want to save an ID between requests, using Flask <code>session</code> cookie, but I'm getting an <code>Internal Server Error</code> as result, when I perform a request.</p>
  
  <p>I prototyped a simple Flask app for demonstrating my problem:</p>
  
  <pre><code>#!/usr/bin/env python
  
  from flask import Flask, session
  
  app = Flask(__name__)
  
  @app.route('/')
  def run():
      session['tmp'] = 43
      return '43'
  
  if __name__ == '__main__':
      app.run()
  </code></pre>
  
  <p>Why I can't  store the <code>session</code> cookie with the following value when I perform the request?</p>