下载文件时,python崩溃了,似乎已保留了文件名


0

收到IO错误时,我正在使用urllib.urlretrieve将文件下载到磁盘上:

 Traceback (most recent call last):
  File "utils.py", line 21, in ?
    urllib.urlretrieve(file[1], GetLogFile(int(file[0][0:4]),int(file[0][5:7]),int(file[0][8:10]),int(file[0][11:13])))
  File "/usr/lib64/python2.4/urllib.py", line 89, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/usr/lib64/python2.4/urllib.py", line 225, in retrieve
    tfp = open(filename, 'wb')
IOError: [Errno 5] Input/output error: 'disk1/logdumps/2008-01/2008-01-05-05.gz'

奇怪的是,虽然没有创建文件2008-01-05-05.gz,但似乎保留了文件名。我现在无法创建此文件。如果尝试在WinSCP中创建它,则会出现此错误:

General failure (server should provide error description).
Error code: 4
Error message from server: Failure
Request code: 3

我可以用不同的名称创建文件。

我正在使用linux(CentOS),disk1是3TB ext2系统的安装点。

发生了什么?


1
听起来您因磁盘错误而跳闸。
伊格纳西奥·巴斯克斯

请不要在问题中回答。按下“ 回答您的问题”,将其作为真实的答案放在下面。您可以在大约6个小时内完成操作。谢谢!
slhck
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.