Click here to Skip to main content
15,849,030 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
test_data=pd.read_csv('C:\\Users\\USER\\Desktop\\python program\\TMDB 
  Program\\test.csv(1).zip')
train_data=pd.read_csv('C:\\Users\\USER\\Desktop\\python program\\TMDB 
  Program\\train.csv(1).zip')


FileNotFoundError                         Traceback (most recent call last)
<ipython-input-6-839f3504b785> in <module>
----> 1 test_data=pd.read_csv('C:\\Users\\USER\\Desktop\\python program\\TMDB Program\\test.csv(1).zip')
      2 train_data=pd.read_csv('C:\\Users\\USER\\Desktop\\python program\\TMDB Program\\train.csv(1).zip')

c:\users\user\appdata\local\programs\python\python37\lib\site-packages\pandas\io\parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision)
    683         )
    684 
--> 685         return _read(filepath_or_buffer, kwds)
    686 
    687     parser_f.__name__ = name

c:\users\user\appdata\local\programs\python\python37\lib\site-packages\pandas\io\parsers.py in _read(filepath_or_buffer, kwds)
    455 
    456     # Create the parser.
--> 457     parser = TextFileReader(fp_or_buf, **kwds)
    458 
    459     if chunksize or iterator:

c:\users\user\appdata\local\programs\python\python37\lib\site-packages\pandas\io\parsers.py in __init__(self, f, engine, **kwds)
    893             self.options["has_index_names"] = kwds["has_index_names"]
    894 
--> 895         self._make_engine(self.engine)
    896 
    897     def close(self):

c:\users\user\appdata\local\programs\python\python37\lib\site-packages\pandas\io\parsers.py in _make_engine(self, engine)
   1133     def _make_engine(self, engine="c"):
   1134         if engine == "c":
-> 1135             self._engine = CParserWrapper(self.f, **self.options)
   1136         else:
   1137             if engine == "python":

c:\users\user\appdata\local\programs\python\python37\lib\site-packages\pandas\io\parsers.py in __init__(self, src, **kwds)
   1904         kwds["usecols"] = self.usecols
   1905 
-> 1906         self._reader = parsers.TextReader(src, **kwds)
   1907         self.unnamed_cols = self._reader.unnamed_cols
   1908 

pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader.__cinit__()

pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()

c:\users\user\appdata\local\programs\python\python37\lib\zipfile.py in __init__(self, file, mode, compression, allowZip64, compresslevel)
   1202             while True:
   1203                 try:
-> 1204                     self.fp = io.open(file, filemode)
   1205                 except OSError:
   1206                     if filemode in modeDict:

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\USER\\Desktop\\python program\\TMDB Program\\test.csv(1).zip'


What I have tried:

I exactly copied the path from the file address but it is not working.
Posted
Updated 20-May-23 2:08am
Comments
Mohibur Rashid 4-Oct-19 2:45am    
What the name of your user in your OS? is this USER? looks odd

FileNotFoundError : [Errno 2] No such file or directory: 'c://data//book.txt'
 
Share this answer
 
Comments
Richard Deeming 22-May-23 4:22am    
Your error message is not a SOLUTION to someone else's question.

And even if you had posted it correctly as a QUESTION[^], nobody can help you without significantly more detail.
I suspect the path is wrong: the error message is most explicit:
No such file or directory: 'C:\\Users\\USER\\Desktop\\python program\\TMDB Program\\test.csv(1).zip'
Either the path is wrong (and "USER" in there does look unlikely) or the file is not where you expected, or not called exactly what you expected.
Copy and paste the path into Windows Explorer, and look for the file name.
 
Share this answer
 
Comments
CPallini 14-May-20 2:06am    
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900