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 Flask Basics Character Builder Items

samar shah
samar shah
2,662 Points

nesting issue

Encountered unknown tag 'endfor'. You probably made a nesting mistake. Jinja is expecting this tag, but currently loo e' or 'endif'. The innermost block that needs to be closed is 'if'.

keep getting this error right near the end of the video, cannot for the life of me see where I have gone wrong, the code is exactly the same as the teachers

1 Answer

Rachel Johnson
STAFF
Rachel Johnson
Treehouse Teacher

Hey samar shah , thanks for sharing your question and I'm sorry to hear that you're running into trouble!

It's a little tricky to see what's happening without seeing your code, especially for other students! The best thing to do when posting for help is to give as much information as possible so that whoever is helping gets a good idea of your context.

I was able to look at your workspaces and pinpoint the Bear project. It looks like there is a typo on line 39. Instead of

{% for choice in choices %}

we have instead

{$ for choice in choices %}

Since this affects the for block, naturally the error that you get is related to the endfor, because according to the code, no for loop was ever started!

I hope this helps you out :) So often the bugs we encounter are tiny, tiny typos!

samar shah
samar shah
2,662 Points

Thank you so much, I don't know how I've missed that LOL I can finally continue!