title: Key Error in Flask Sessions
body: <p>So I have been using sessions to pass data from one decorator to another. But now every time I make a new session variable, I get a KeyError from page to page. Meaning, I had a session error from my third to fourth page; but I had the same issue adding a new session variable from my second to third page even though I have four other session variables that give me no error. </p>
  
  <p>My code is similar to the one @laila posted below: </p>
  
  <pre><code>from flask import Flask, render_template
  from flask import request, session, url_for,abort,redirect
  
  app = Flask(__name__)
  
  app.config['SECRET_KEY'] = 'secret'
  
  
  @app.route('/'):
  def first():
      session['this_one']='hello'
      render('template.html')
  
  @app.route('/second')
  def second():
     it=session['this_one']
      render('other_page.html')
  
  if __name__ == '__main__':
      app.run(debug=True)
  </code></pre>