nondanee / weiboPicDownloader

Download weibo images without logging-in
GNU General Public License v3.0
266 stars 63 forks source link

OSError: [Errno 5] Input/output error #19

Closed kybom closed 5 years ago

kybom commented 6 years ago
------------------------------
30/408 Tue May  8 09:51:27 2018
SNH48-刘菊子 6020769478
finish analysis 515/526
practically get 515 weibos, 1790 medias
downloading... 0/1790(0%)Traceback (most recent call last):
  File "weiboPicDownloader.py", line 288, in <module>
    if task.result() == False:
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "weiboPicDownloader.py", line 204, in download
    f = open(file_path,"wb")
OSError: [Errno 5] Input/output error: 'weiboPic/SNH48-刘菊子/006zsxb8gy1fqz7ab5617j33402c0b29.jpg'
ommit 16e997f765c3d72402a32980c12bdbf9638c98d5
kybom commented 6 years ago

下载文件夹放在Ubuntu1804上挂载的移动硬盘上

xxx@wss:/media/xxx/pic48/weibopic/weiboPicDownloader/weiboPic$ ls
ls: cannot access '-CKG48-余梦露': Input/output error
ls: cannot access '-CKG48-吴晓桐': Input/output error
ls: cannot access '-CKG48-周桐冉': Input/output error
ls: cannot access '-CKG48-徐慧玲': Input/output error
ls: cannot access '-CKG48-徐楚雯': Input/output error
ls: cannot access '-CKG48-戴紫薇': Input/output error
ls: cannot access 'GNZ48-梁乔': Input/output error
ls: cannot access 'GNZ48-梁娇': Input/output error
ls: cannot access 'GNZ48-章泽婷': Input/output error
ls: cannot access 'GNZ48-谢菲菲': Input/output error
ls: cannot access 'GNZ48-郭铱宁': Input/output error
ls: cannot access 'GNZ48-门秀天': Input/output error
ls: cannot access 'SHY48-刁滢': Input/output error
ls: cannot access 'SHY48-张云梦': Input/output error
ls: cannot access 'SHY48-朱敏': Input/output error
ls: cannot access 'SHY48-李苏洪': Input/output error
ls: cannot access 'SHY48-王嘉瑜': Input/output error
ls: cannot access 'SHY48-王雨兰': Input/output error
ls: cannot access 'BEJ48-周湘': Input/output error
ls: cannot access 'BEJ48-张丹丹': Input/output error
ls: cannot access 'BEJ48-彭嘉敏': Input/output error
ls: cannot access 'BEJ48-曲美霖': Input/output error
ls: cannot access 'SHY48-黄嘉怡': Input/output error
^C

可能是硬盘出问题了

kybom commented 6 years ago

这个移动硬盘放在windows下可以打开weiboPic这个文件夹,但是没有上面那些人的文件夹,这些人是我最近添加的。似乎这些文件夹能检测,但是系统又找不到。会不会是新版本创建的文件夹有问题?

kybom commented 6 years ago

单独下载上面的人也没问题。 就是用-f uid.txt 下载到这个人的时候出问题,可以复现。

30/408 Tue May  8 09:51:27 2018
SNH48-刘菊子 6020769478
finish analysis 515/526
practically get 515 weibos, 1790 medias
downloading... 0/1790(0%)Traceback (most recent call last):
  File "weiboPicDownloader.py", line 288, in <module>
    if task.result() == False
nondanee commented 6 years ago

创建目录的代码一直没有改过 不过你是否在sudo su后运行过此程序? 查一查目录所属是否是root,当前用户有没有rwx权限?

kybom commented 6 years ago

应该跟权限没有关系,可能是这些特殊文件导致的,属性全是问号,如下图 qq 20180509181301 暂时没找到产生的原因和解决办法,不知道怎么删除这些文件。

nondanee commented 6 years ago

不知道了,试试fsck吧。。。

nondanee commented 6 years ago

确认单独下载没有问题?

kybom commented 6 years ago

应该跟单独下载没什么关系,这个问题是没有属性的文件导致的。我在windows下用chkdsk修复一下,看看有没有用。

kybom commented 6 years ago

chkdsk删除了很多解析记录,这次应该可以,我再试试。 qq 20180509185825

nondanee commented 6 years ago

👌

kybom commented 6 years ago

这些损坏的文件是怎么产生的呢?这是个问题。硬盘没有损坏。

nondanee commented 6 years ago

已超出我的认知 程序里的用到的文件IO都用的是最最最普通的IO操作 表示不背锅