I'm trying to get the stocks by quote and it worked just fine a week ago but it suddenly stopped working. Can someone please explain me what has changed and how I should alter my code to get it working again? You can read my code below. I haven't altered the helpers.py function. Thanks in advance!

@app.route("/quote", methods=["GET", "POST"])
def quote():
    if request.method == "POST":

        if not request.form.get("quote"):
            return apology("must provide symbol")

        stock = lookup(request.form.get("quote"))
        if stock == None:
            return apology("Stock could not be found")

        return render_template("quoted.html", stock=stock)

       return render_template("quote.html")

1 Answer 1


Well, noticed that indentation error happened in the last line of your code, maybe that is the reason why. When indentation error happened it should display in the terminal window.

  • The actual number of spaces shouldn't matter as long as you remain on the same indentation level within a block (and there's only that line). Just don't mix spaces and tabs ;)
    – Blauelf
    Nov 14, 2017 at 10:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .