Python &引用;OSError:[Errno 5]输入/输出错误“;尝试读取文件时
我的代码在2天前就开始工作了,但在尝试读取文件时,突然收到以下错误消息 代码: 错误消息:Python &引用;OSError:[Errno 5]输入/输出错误“;尝试读取文件时,python,pandas,multiprocessing,pool,Python,Pandas,Multiprocessing,Pool,我的代码在2天前就开始工作了,但在尝试读取文件时,突然收到以下错误消息 代码: 错误消息: RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File &
RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/home/script.py", line 150, in read_csvFile
return pd.read_csv(filename, sep='|',usecols=cols, engine='python').query('BAL == 0')
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 676, in parser_f
return _read(filepath_or_buffer, kwds)
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 454, in _read
data = parser.read(nrows)
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 1133, in read
ret = self._engine.read(nrows)
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 2431, in read
content = self._get_lines(rows)
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 3181, in _get_lines
new_row = self._next_iter_line(row_num=self.pos + rows + 1)
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 2891, in _next_iter_line
return next(self.data)
OSError: [Errno 5] Input/output error
"""
如何修复它?这有帮助吗?-这有用吗-
RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/home/script.py", line 150, in read_csvFile
return pd.read_csv(filename, sep='|',usecols=cols, engine='python').query('BAL == 0')
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 676, in parser_f
return _read(filepath_or_buffer, kwds)
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 454, in _read
data = parser.read(nrows)
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 1133, in read
ret = self._engine.read(nrows)
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 2431, in read
content = self._get_lines(rows)
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 3181, in _get_lines
new_row = self._next_iter_line(row_num=self.pos + rows + 1)
File "/home/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 2891, in _next_iter_line
return next(self.data)
OSError: [Errno 5] Input/output error
"""