Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Flask Basics Character Builder Cookies

Andy Hughes
Andy Hughes
8,114 Points

can't figure out this response.set_cookie quiz question

I'm doing the first quiz in the cookies section and there is a question that says:

Set a cookie named "name" to "Treehouse"

resp = make_response() resp.set_cookie(_____ , _______)

Inside the brackets take two arguments or parameters. I know the one on the right is "Treehouse" but I can't for the life of me figure out what to put in the left hand space.

I've tried (name, "Treehouse") I've tried (json.dumps(response.form.items())) I've tried watching the video backwards and forwards but I can't see anywhere, where he covers this directly.

Then just by chance I thought, what if I just stick them both in as strings and it worked!!

So so sooooooo frustrating and infuriating. If you're going to set quiz questions, at least have covered them properly!

1 Answer

Chris Freeman
Chris Freeman
Treehouse Moderator 68,064 Points

Hey Andy Hughes, you are so close!

”name” must be within quotation marks.

Post back if you need more help. Good luck!!!

Andy Hughes
Andy Hughes
8,114 Points

Chris Freeman - thanks Chris, I did manage to figure it out (more by luck than genius!). My post was more about the frustration of having a quiz question that's not actually covered in the videos. I just keep feeling like I'm stupid for missing things, when actually I haven't.

Thanks anyway for the help. :)