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 Flask Basics Templates and Static Files Flat HTML

Workspace Unavailable

I want to test my code but when I go to port 8000 it lands me to a page that says:

"Workspace Unavailable This is a preview link for a Treehouse Workspace that is not currently active. If you are the workspace owner, you can launch it again via the Treehouse site."

Am I doing something wrong or is this Workspace really not working?

Steven Parker
Steven Parker
231,236 Points

We can check it if you make a snapshot of your workspace and post the link to it here.

3 Answers

Steven Parker
Steven Parker
231,236 Points

Were you running the app when you tried to connect? That's what I would see if I don't run the app.

But I get a different response with the app running, which I did with the "python simle_app.py" command in the workspace console:

treehouse:~/workspace$ python simple_app.py                                                       
 * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)                                         
 * Restarting with stat                                                                           
 * Debugger is active!                                                                            
 * Debugger PIN: 605-325-445                                                                      

There's still some things to work on, but it does connect. Then I get a "jinja2.exceptions.TemplateNotFound" error in the preview (with associated diagnostics). That may be due to the file being named "indext.html" (with a "t") instead of "index.html".

FIxing the name leads to yet another error, this time "jinja2.exceptions.TemplateSyntaxError", but you should be able to continue debugging from there.

Sure, here it is:

https://w.trhou.se/6dwkmspb28

Thanks!

Now it works. It seems I was forgetting very basic stuff haha.

Thanks, Steven!