0

I am working with on a course by coursera, and wanted to try the scripts locally. I got this error:

IOError: [Errno 2] No such file or directory: 'datasets/data.mat'

The file is in the directory and I can see it from Finder on MAC, however, it's not visible form the file explorer in Spyder.

I found this question: Read .mat files in Python and checked that original module according to what is suggested in the first answer, but still the file cannot be reached.

I don't know if it's worth mentioning, but the file has a shortcut icon (even though I've downloaded it directly from coursera).

Why the file is not reachable? and how reach it?

Dev-iL
  • 22,722
  • 7
  • 53
  • 89
philippos
  • 881
  • 3
  • 14
  • 32
  • It sounds like a filepath issue, not a problem with the file itself. Try printing your 'datasets/' directory from within Python using `os.listdir()` and see if your .mat file shows up. – berkelem Sep 03 '18 at 10:19
  • @berkelem Thanks for your comment. However, I already thought of the filepath problem, and the `os.listdir() ` returns the files in the path including the one of my interest. Actually, I also tried to access the file through the `Atom` editor, but it's not accessible from there either. – philippos Sep 05 '18 at 02:57

0 Answers0