NLP, local dataset, problem creating the 'path'

I have my own labelled dataset of 11.5k entries (‘learning_data_comb.csv’) that is imported into a Jupyter notebook as a DataFrame. I’m following along with the ‘lesson3 IMDB’ example and I have a couple of questions:

I’m having problems creating the path for my imported data, as in this case it is not necessary to untar my data.

I have checked this page:

I have tested with ‘path = datapath4file(‘learning_data_comb.csv’)’

But then when I run:

I receive a File Not Found error:

FileNotFoundError: [Errno 2] No such file or directory: ‘/Users/~/.fastai/data/learning_data_comb.csv’

Please is anyone able to provide me some advice?
Many thanks in advance :slight_smile:

@SimonGee Did you solve this issue? I am facing the same currently. I have a datset for image classification saved in my D Drive of local computer. When I type

path = ‘D:\Machine Learning\Classification\101_ObjectCategories’

I get the following error: str object has no attribute ls

@YashRunwal95 I think for your issue, using

path = Path(‘D:\Machine Learning\Classification\101_ObjectCategories’)

will resolve that particular error. I also got the same error and this solved it.

1 Like

Recently had the same problem, the solution had something to do with not fastai but pytorch(maybe).

here is the relevant code:
from fastai.torch_basics import *
path = Path(’/home/user/data’)

Hope this helps