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 trialLiviu Cucerenco
8,039 PointsProblem with [Student]
Hello, I doing the work in this course on the PyCharm IDE. Unfortunately, the line: 'db.create_tables([Student], safe=True)' does not compile. Specifically, it underlines '[Student]' and says "Unresolved reference 'Student'". Consequently, it does not create the Student table in the database. I wonder if anyone could suggest a solution? Thank you for your time.
1 Answer
Liviu Cucerenco
8,039 PointsThank you for your suggestion. I actually resolved the issue. It was an indentation problem - the if block fell under the class block, so it was confused. As I am new in Python, my problems tend to be caused by silly mistakes. Thank you for taking the time to address my question though.
Cheo R
37,150 PointsCheo R
37,150 PointsHello Liviu, have you tried doing migrations and migrate? You may have forgotten to add your changes to your models.