Python Flask Basics Character Builder Flash a Message

Yusuf Lawal
Yusuf Lawal
5,366 Points

I keep getting an error. My code looks fine to me. Can anyone help?

Here's the error I got: Bummer: 'EnvironBuilder' object has no attribute 'find'

flask_app.py
from flask import Flask, redirect, url_for, render_template, flash

app = Flask(__name__)
app.secret_key = "kjuht%$"

@app.route('/')
def index():
    return render_template("index.html")

@app.route('/fishy')
def fishy():
    flash("Howdy")
    return redirect(url_for('index'))

2 Answers

Alex Koumparos
MOD
Alex Koumparos
Python Web Development Treehouse Moderator 32,450 Points

I think it is a Treehouse bug. I was able to reproduce your problem. And here is another user with the same issue.

It looks like it's been reported as a bug, so wait and see, I guess.

Cheers

Alex