Python Flask Basics Character Builder Set a Cookie

What is wrong here?

What is wrong with my challenge code?

flask_app.py
from flask import Flask, make_response

app = Flask(__name__)


@app.route('/save')
def save():
    response = make_response(response)
    response.set_cookie("treehouse", "whatup")
    return response

1 Answer

Ryan S
Ryan S
27,273 Points

Hi Alexander,

The challenge asks you to call `make_response() with no arguments. I'm not sure why it passed task 2, but it is causing your error in task 3.

response = make_response()

Good luck.