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 trialSam Cerwinske
Courses Plus Student 2,876 PointsNo module named "___"
I'm working in my workspace and all the sudden it is telling me that none of the files or directories exist. If I try to run the program in console it gives me the error "python: can't open file '__.py': [Errno 2] No such file or directory." Also, if I am running the terminal and type "from __ import " it sends me the "ModuleNotFoundError: No module named ''"
Now I am using the actual file names, but for the sake of example I'm just omitting the name. This is also when I import the workspace from the course itself, so its not when I just make one myself.
Here is a snapshot of the workspace https://w.trhou.se/jf2jabpg8a
2 Answers
Steven Parker
231,271 PointsAll of the Python files in this workspace are located in the "rpg" directory, you'd need to select it first with the "cd" command:
treehouse:~/workspace$ cd rpg change directory first
treehouse:~/workspace/rpg$ python play.py then the programs will work
False
True
False
treehouse:~/workspace/rpg$
Sam Cerwinske
Courses Plus Student 2,876 PointsThanks Steve! I updated the post.
Steven Parker
231,271 PointsSteven Parker
231,271 PointsTo allow replication of the issue, make a snapshot of your workspace and post the link to it here.