HELP: Stuck in step 10 - BUILD PYTHON WEB APPS WITH FLASK: Tourist Attractions

Hello!

I’m stuck on step 10 of the BUILD PYTHON WEB APPS WITH FLASK: Tourist Attractions Project:
https://www.codecademy.com/paths/build-python-web-apps-flask/tracks/introduction-to-flask/modules/flask-templates-and-forms/projects/tourist-attractions-app

I don’ understand why my code isn’t working, I’m following the instructions closely but i’m still getting the same error each time. Since I don’t have access to a console in this exercise It’s very difficult for me to find the problem:

@app.route("/<category>", methods=["GET", "POST"]) def locations(category): locations = visit.get_list_by_category(category) ## Check the request for form data and process if request.method == "POST": [(name, action)] = request.form.items() if action == UP_ACTION: visit.moveup(name) elif action == DEL_ACTION: visit.delete(name) ## Return the main template with variables return render_template("locations.html", template_category=category, template_categories=categories, template_locations=locations)

The error i’m getting is:

Please help, thanks in advance.