fffonion / xeHentai

Doujinshi downloader 绅士漫画下载
https://yooooo.us/2013/xehentai
GNU General Public License v3.0
729 stars 88 forks source link

report an error of winerror 17 #72

Closed seamory closed 4 years ago

seamory commented 5 years ago

When the download directory is not set on the C drive, it will be reporting an error of winerror 17. Suggest to change os.rename(fn_tmp, fn) on line 238 of the task.py file to shutil.move(fn_tmp, fn).

Traceback (most recent call last):
  File "C:\Program Files\Python38\lib\site-packages\xehentai-2.2-py3.8.egg\xeHentai\worker.py", line 195, in run
    self.request("GET", url, self.flt, self.f_suc, self.f_fail, stream_cb=_stream_cb)
  File "C:\Program Files\Python38\lib\site-packages\xehentai-2.2-py3.8.egg\xeHentai\worker.py", line 136, in request
    return _filter(r, suc, fail)
  File "C:\Program Files\Python38\lib\site-packages\xehentai-2.2-py3.8.egg\xeHentai\filters.py", line 123, in _
    func(r, suc, fail)
  File "C:\Program Files\Python38\lib\site-packages\xehentai-2.2-py3.8.egg\xeHentai\filters.py", line 214, in download_file
    suc((_yield, r._real_url, r.url))
  File "C:\Program Files\Python38\lib\site-packages\xehentai-2.2-py3.8.egg\xeHentai\core.py", line 284, in <lambda>
    lambda x, tid = tid: (task.save_file(x[1], x[2], x[0]) and \
  File "C:\Program Files\Python38\lib\site-packages\xehentai-2.2-py3.8.egg\xeHentai\task.py", line 266, in save_file
    raise ex
  File "C:\Program Files\Python38\lib\site-packages\xehentai-2.2-py3.8.egg\xeHentai\task.py", line 249, in save_file
    raise ex
  File "C:\Program Files\Python38\lib\site-packages\xehentai-2.2-py3.8.egg\xeHentai\task.py", line 238, in save_file
    os.rename(fn_tmp, fn)
OSError: [WinError 17] 系统无法将文件移到不同的磁盘驱动器。: 'C:\\Users\\Me\\AppData\\Local\\Temp\\xehentai-a3zuz3le' -> 'D:\\Pictures\\Collection 3\\348.jpg'
fffonion commented 5 years ago

Hi, this is a known issue with 2.020 and below, please try version 2.021 https://github.com/fffonion/xeHentai/tree/dev or download exe from https://dl.yooooo.us/share/xeHentai/xeHentai-2.0.2.1-%E6%B5%8B%E8%AF%95%E7%89%88.exe.zip

fffonion commented 4 years ago

Please reopen issue if the problem still exists : )