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
Julie Egan
Courses Plus Student 703 Pointsmy workspace isnt working...i think!! when i type typhon functions.py nothing happen, same with exceptions etc... :(
im on another challenge now with the shopping list, and still the same, i dont know what im doing wrong :(
3 Answers
Greg Kaleka
39,021 PointsHey Julie,
Just checking, but I assume you mean python and not typhon. If that's not a typo, then, well, that's your problem!
Assuming you're correctly typing python, you have to make sure that the console is in the correct directory. Type ls to see the contents of the current directory. If you don't see functions.py (or whatever you're trying to run), then you need to move to the directory that has that file in it using cd.
If that's not the problem, try running cat functions.py and make sure it's spitting out the text from the file.
The last thing to do would be to make sure it's not just an error in your functions.py file. Try making a new file called test.py, and just put one line of code in it: print("the workspace is running python correctly!"). Then in the console run python test.py. If it prints out the line of text, then it's probably just that something's wrong in your python file.
If it doesn't print that line, then it's time to reach out to support@teamtreehouse.com.
Good luck - and let us knwo what you figure out!
Cheers
-Greg
Oszkár Fehér
Treehouse Project ReviewerHi Julie, Sometimes the workspace doesn't work, usually it's from them. If you still have problem write to teamtreehouse support. I hope it helps you with something
Julie Egan
Courses Plus Student 703 PointsI've tried them 2 days ago when it first happened and they said to try the community as they only deal with bills enquire etc... :(
Julie Egan
Courses Plus Student 703 PointsJulie Egan
Courses Plus Student 703 PointsThanks...and I'm sure it's my problem I'm just trying to figured it out where I'm doing it wrong, I will let you knwo for sure...
Julie Egan
Courses Plus Student 703 PointsJulie Egan
Courses Plus Student 703 Pointsgreg i have done everything you told me and still it doesnt work, ive ask for help on that email but i was told that they only deal with billing enquires etc...is there another way i could get help? could it be my browser? (sorry if its a silly question)
Greg Kaleka
39,021 PointsGreg Kaleka
39,021 PointsHm... possibly. You could definitely try it in another browser. Maybe in private browsing mode as well (or incognito in Chrome). That might help if you've got a browser plugin that's blocking python somehow (this seems extremely unlikely).
What happened when you ran
python test.py?I would also make sure python is installed on that particular workspace. If you type in
python --versionwhat do you see? You could try running any of these commands with python3 instead of python as well.Julie Egan
Courses Plus Student 703 PointsJulie Egan
Courses Plus Student 703 Pointsi was on chrome and tried on explorer and didn't make any difference.
on console: treehouse:~/workspace$ python test.py treehouse:~/workspace$ <---- that's what i get back
when i try my very first file hello_world.py that comes back fine but the exceptions.py, functions.py and shopping_list.py all that comes back on console is treehouse:~/workspace$ when i type dir i get the name of all my files in python, so i'm guessing it's there?
when i type python the version is 3.5.0
thanks for trying to help me:(
Greg Kaleka
39,021 PointsGreg Kaleka
39,021 PointsCan you share a workspace snapshot here so I can see if it's working for me, or there's some other obvious issue? There's a little camera icon that will let you save a snapshot and then you can share the URL here.
Julie Egan
Courses Plus Student 703 PointsJulie Egan
Courses Plus Student 703 Pointshttps://w.trhou.se/p1zfh4681k
hope i have done it right, sorry for the trouble.
Greg Kaleka
39,021 PointsGreg Kaleka
39,021 PointsSo... your files are all empty except for hello_world.py
When you run
python filename.py, python opens up the file and runs all the python in the file. If there's no python in the file, then nothing will happen. This is why I suggested adding a print function in test.py.You have to actually add python code to a file for python to do anything with it
Julie Egan
Courses Plus Student 703 PointsJulie Egan
Courses Plus Student 703 Pointsthats my point greg :( i did have all the shopping_list code done :( it just disappeared!! im not that silly to not write a code and say its not working...i can make a video of me doing it and post in the community if it helps!!
Julie Egan
Courses Plus Student 703 PointsJulie Egan
Courses Plus Student 703 Pointsi saw a comment under that video that it has happened to someone else but there's no useful reply there to me, the only reply refer to Mac system which i don't use
Greg Kaleka
39,021 PointsGreg Kaleka
39,021 PointsAre you saving the file after you write code in it?
Julie Egan
Courses Plus Student 703 PointsJulie Egan
Courses Plus Student 703 Pointscan we delete it all and pretend it never happened?? :( for the last 4 days i was trying to get help with a work i forgot to to click on save!! so embarrassing :( sorry and yes that was the problem. thanks for your patience greg and for all the time you've spent trying to help me.
Greg Kaleka
39,021 PointsGreg Kaleka
39,021 PointsHaha phew! It's always something silly.
I'll pretend if you'll pretend