W2_Lab03 & Lab05 OSError: ./data/houses.txt not found

Hello,

In C1_W2_Lab03 & Lab05 I am having trouble with loading the dataset houses.txt. I use Google Colab and I have uploaded the course script into it. Also, I have downloaded all the necessary course materials.

Then I have uploaded the required files (deeplearning.mplstyle, lab_utils_common.py, lab_utils_multi.py and houses.txt) into Colab and imported the libraries and classes (I use the exact same code as in the class), but when I run the following code for loading the data set

X_train, y_train = load_house_data()
X_features = [‘size(sqft)’,‘bedrooms’,‘floors’,‘age’]

I get an error:

OSError: ./data/houses.txt not found.

My houses.txt file is indeed stored in the data named directory, so I don’t know what could be the issue.

Any ideas?

Manny thanks!

Davor

Hi. Maybe is the directory. The code is looking for a file store in a folder under the name “data” If you store all your files in the same directory it won’t work.

Let me know if this solves your problem

Hi, @Davor_Troselj

If you want to run your practice labs locally on your machine. please, download the all files to be able to run it successfully.

You can do that by Lab Files → download all files this will download a .zip file extract it and you will be good to go.

Cheers,
Moaz

1 Like

Hi @pastorsoto and @Moaz_Elesawey
Thank you for your replies.
I have already downloaded all the files from the lab on my laptop and extrated it. I haven’t tampered with the file, the houses.txt file is stored in a folder named ‘data’.
image

I have even tried to upload the houses.txt file in Colab, however still no progress…

I think you need to upload the actual data folder.

If you upload only the txt file the code wont find it. It needs to be in a folder named “data” on your colab. You can just upload the data folder of your machine

Hope this helps