title: Python Flask heroku application error
body: <p>So I do have a flask app, I can run it in my computer locally and deployed it to heroku successfully but when I do <code>heroku open</code> the site keeps on saying Application Error.</p>
  
  <p>This is in my app.py:</p>
  
  <pre><code>import random
  import os
  
  from flask import Flask
  from gen_histogram import histogram
  from sample import generate_probability, generate_word
  
  app = Flask(__name__)
  
  dict_histogram = histogram('tom_sawyer.txt')
  
  tes_list = ["one", "fish", "two", "fish", "red", "fish", "blue", "fish"]
  
  
  def try_random():
     return random.choice(tes_list)
  
  
  @app.route('/')
  def hello_world():
     return try_random()
  
  
  if __name__ == '__main__':
     port = int(os.environ.get("PORT", 5000))
     app.run(debug=True, port=port)
  </code></pre>
  
  <p>Procfile:</p>
  
  <pre><code>web: gunicorn app:app
  </code></pre>
  
  <p>Notes:</p>
  
  <blockquote>
    <p>I have everything setup including virtualenv and requirements.txt</p>
  </blockquote>