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'
from flask import Flask, redirect, url_for, render_template, flash

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

def index():
    return render_template("index.html")

def fishy():
    return redirect(url_for('index'))

2 Answers

Alex Koumparos
Alex Koumparos
Python Web Development Techdegree Student 35,922 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.