llSourcell / tensorflow_demo

Tensorflow Demo for my TF in 5 Min Video on Youtube
229 stars 174 forks source link

cannot find the path error. #3

Open aravindsasidharan opened 7 years ago

aravindsasidharan commented 7 years ago

Sir, @llSourcell I am getting following error please help to sort out: Traceback (most recent call last): File "board.py", line 4, in mnist = input_data.read_data_sets("/tmp/data/", one_hot=True) File "C:\learn\tensorflow_demo\input_data.py", line 149, in read_data_sets local_file = maybe_download(TRAIN_IMAGES, train_dir) File "C:\learn\tensorflow_demo\input_data.py", line 14, in maybe_download os.mkdir(work_directory) WindowsError: [Error 3] The system cannot find the path specified: '/tmp/data/'

TheMLGuy commented 7 years ago

Change the path in the code to point to the location of 'data.csv'( data file). You can either use an absolute path or a relative path.

turkialjrees commented 5 years ago

use a raw string such as :

r"C:\Users\Mainuser\Desktop\Lab6"

or using os.path.join to construct your path instead:

os.path.join("c:", os.sep, "Users", "Mainuser", "Desktop", "Lab6")

os.path.join is the safest and most portable choice. As long as you have "c:" hardcoded in the path it's not really portable, but it's still the best practice and a good habit to develop.

With a tip of the hat to Python os.path.join on Windows for the correct way to produce c:\Users rather than c:Users.