Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't Find Path
#1
I get the following error {the last line shown} regarding the path. "The system cannot find the path specified: './Data/train' "

The location of the train folder is correct. Do I have the format wrong?

In the main file, main.py:

train_dir = os.path.join(data_dir, 'C:\Documents\Pyro\dogs-vs-cats\train')
train_dataset = datasetloader(train_dir, transform=train_transform)  **error**
In another file, dataset.py:

class datasetloader(Dataset):
    def __init__(self, path, transform=None):
        self.classes   = os.listdir(path)  ##the error causing line  **error**
Larz60+ write Oct-30-2023, 02:53 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Modified for you this time. Please use BBCode tags on future posts.
Reply


Messages In This Thread
Can't Find Path - by hatflyer - Oct-29-2023, 06:05 PM
RE: Can't Find Path - by Axel_Erfurt - Oct-29-2023, 07:47 PM
RE: Can't Find Path - by snippsat - Oct-29-2023, 08:14 PM
RE: Can't Find Path - by hatflyer - Oct-29-2023, 08:37 PM
RE: Can't Find Path - by hatflyer - Oct-29-2023, 08:42 PM
RE: Can't Find Path - by Axel_Erfurt - Oct-29-2023, 09:18 PM
RE: Can't Find Path - by hatflyer - Oct-29-2023, 10:51 PM
RE: Can't Find Path - by deanhystad - Oct-29-2023, 11:37 PM
RE: Can't Find Path - by Gribouillis - Oct-30-2023, 06:17 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 2,240 Sep-09-2021, 01:25 PM
Last Post: Yoriz
Exclamation "System cannot find path specified"(Geany) kiwi99 2 3,929 Mar-18-2021, 07:37 PM
Last Post: kiwi99
  [split] FileNotFoundError...System cannot find the path specified powerrocker 1 2,082 Oct-03-2019, 09:09 AM
Last Post: buran
  FileNotFoundError...System cannot find the path specified alex9745 28 21,702 Jul-23-2019, 05:14 AM
Last Post: alex9745
  [python]FileNotFoundError...System cannot find the path specified creichle 1 3,666 Jan-30-2019, 12:49 AM
Last Post: Larz60+
  .pth file does not show up in sys.path when configuring path. arjunsingh2908 2 5,812 Jul-03-2018, 11:16 AM
Last Post: arjunsingh2908

Forum Jump:

User Panel Messages

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