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.
Callum Anderson9,414 Points
Ignored acception in console, continues to loop - SQLAlchemy/Pyhton
After adding my try block and ValueErrors which are working fine, but if I enter the response that should be accepted and continue the app to the next stage is instead looping the same request so I am unable to continue. Any help is appreciated this is really interesting so far and had loads of fun
I made a workspace to snapshot for ease:
Many Thanks, Callum
Chris FreemanTreehouse Moderator 67,464 Points
Hey Callum Anderson! The error is in the type comparison
type(date) == datetime.date. The expression
<class 'type'>. The comparison you wish to make is
date is not the best name for a local object since it can be confused with
datetime.date in the case where it was imported using
from datetime import date. Use a more descriptive name such as
pub_date rather than just being a "date".
Post back if you need more help. Good luck!!