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

For some reason, even with code that I know passes, the test will run and say "no such table: songs_performer'.

Like I said, I know my code is good, as I compared it to somebody else's and it was pretty much the same. In fact, when I tried their code, I got the same error. Does anybody know why this could be or should I just start a new workspace from scratch and try it that way?

If you post your code and the challenge's text that I can definitely help you.

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,423 Points

In the Test Driven Development challenge, the Song model has a ForeignKey to the Performermodel. Accessing the performer from a particular song in the database is done using the "dot" notation:

song.performer

In django database lookups the dot notation is replaced with two underscores: song__performer