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 Build a Social Network with Flask Tacocat Challenge The Challenge

Max Hirsh
Max Hirsh
16,773 Points

Python tests all check out, but getting "error your code took too long to run" when I post my code into the challenge?

I got the tacocat app to work and wanted to fully complete the course... But it looks like my code took too long to run in the final challenge assessment. I'm wondering if the time limit is still set for smaller code challenges and is triggering a timeout error for this much longer code challenge.

Update: I tried removing a few lines of extra code and was able to pass the challenge after submitting it a third time. Refreshing the browser window seemed to help.

2 Answers

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

Did you have the app.run() bit in there? If so, the app runs (like it should) and the test runner times out waiting on it to stop.

Max Hirsh
Max Hirsh
16,773 Points

I searched for app.run() and didn't find anything. My code did eventually pass when I reloaded the challenge so it could have been a browser/connection issue.

This is old, but it isn't EXACTLY 'app.run()', so searching won't do you any good. It's 'app.run(debug=DEBUG, host=HOST, port=PORT)'. So, if you are really into ctrl+F, look for that instead.