Как решить проблему с файлом not found error в Python?
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'
Что я уже пробовал:
Я точно скопировал путь из адреса файла, но он не работает.
Mohibur Rashid
Каково имя вашего пользователя в вашей ОС? это пользователь? выглядеть странно