Lesson 3 Rossman: No such file or directory: 'data\\rossmantmp/sub.csv'

(Khoo) #1

I have searched online and forum for a solution to no avail on this error on DL1 Lesson 3 Rossman:
joined_test[['Id','Sales']].to_csv(csv_fn, index=False)
FileNotFoundError: [Errno 2] No such file or directory: 'data\\rossmantmp/sub.csv'

I checked the directory data/rossman/tmp exist but no sub.csv file in it.
There is data/rossman/model/ with tmp.h5 and val0.h5 files.
Running latest jupyter (git pull and conda env update) on environment-cpu.yml on Win 8.1

Uploaded error:

FileNotFoundError Traceback (most recent call last)
in ()
----> 1 joined_test[[‘Id’,‘Sales’]].to_csv(csv_fn, index=False)

~\Anaconda3\envs\fastai-cpu\lib\site-packages\pandas\core\frame.py in to_csv(self, path_or_buf, sep, na_rep, float_format, columns, header, index, index_label, mode, encoding, compression, quoting, quotechar, line_terminator, chunksize, tupleize_cols, date_format, doublequote, escapechar, decimal)
1743 doublequote=doublequote,
1744 escapechar=escapechar, decimal=decimal)
-> 1745 formatter.save()
1747 if path_or_buf is None:

~\Anaconda3\envs\fastai-cpu\lib\site-packages\pandas\io\formats\csvs.py in save(self)
154 f, handles = _get_handle(self.path_or_buf, self.mode,
155 encoding=encoding,
–> 156 compression=self.compression)
157 close = True

~\Anaconda3\envs\fastai-cpu\lib\site-packages\pandas\io\common.py in _get_handle(path_or_buf, mode, encoding, compression, memory_map, is_text)
398 elif encoding:
399 # Python 3 and encoding
–> 400 f = open(path_or_buf, mode, encoding=encoding)
401 elif is_text:
402 # Python 3 and no explicit encoding

FileNotFoundError: [Errno 2] No such file or directory: ‘data\rossmantmp/sub.csv’

(Khoo) #2

Fixed this error by amending a prior cell to this: