Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

pet
pet
10,908 Points

Tacocat error: 'tacos' is undefined.

I know there are a lot of Tacocat questions, but I'm still having trouble figuring this out. If I run my code or if I use app_tests.py is still get "jinja2.exceptions.UndefinedError: 'tacos' is undefined". Any help would be appreciated, thanks in advance. :)

Here is a link to a snapshot of my workspace. Note: the file 'tacocat(v1).py' is unnecessary, I probably should have left it out of the snapshot. :)

pet
pet
10,908 Points

Sorry it took a while to respond. I tested your idea and I'm still getting the same error. Thanks for your help. :)

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,454 Points

I can’t test this answer at the moment.

It looks like index.htlm template is referencing tacos but the render_template statement in tacocat.py is passing stream instead. Try tacos=stream

Let me know if this helps. Good luck.