Python Forum
Opening files in same directory as script
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Opening files in same directory as script
#4
(May-28-2020, 05:22 PM)GOTO10 Wrote: Your code appears to be correct. Can you post the full traceback error message?
The error message is:
FileNotFoundError: [Errno 2] No such file or directory: 'box.txt'

I have seen what the problem was just from a question a user asked.
I did not open the folder in vs code and the editor was reading from another folder. So, because someone asked about the folder, I decided to open the folder directly in vs code and it saw the file.
Thanks
Reply


Messages In This Thread
RE: Opening files in same directory as script - by Emekadavid - May-28-2020, 06:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question How to print directory files (& timestamps) chatguy 3 1,389 Dec-29-2022, 07:19 AM
Last Post: ndc85430
  traverses directory recursively and displays files Prani05 7 3,397 Apr-30-2020, 10:25 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020