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 trialjoshuat
Python Development Techdegree Student 3,285 PointsI keep receiving the error "didn't find the challenge I asked you to create.
Not sure what I am supposed to do.
I have tried:
challenge = create_challenge('bobo the cat', 'Meow Meow') and also just calling the function as in the code below.
from models import Challenge
def create_challenge(name, language, steps=1):
Challenge(name, language, steps)
create_challenge('Bobo the cat', 'meow meow')
1 Answer
joshuat
Python Development Techdegree Student 3,285 PointsI was able to find the answer.
Challenge.create(name=name, language=language, steps=steps)
is what the error was asking for. I am not sure if it's available, but having access to the module that is imported would have made the question more understandable to me, as I forgot that the class Challenge is a database.
Mark Sebeck
Treehouse Moderator 37,905 PointsMark Sebeck
Treehouse Moderator 37,905 PointsJoshuat, glad you were able to solve your problem and posted back that you did. I changed your comment to an answer and marked it the best answer. Keep at it!