kylebebak / Requester

Powerful, modern HTTP/REST client built on top of the Requests library
https://kylebebak.github.io/Requester/
MIT License
307 stars 10 forks source link

download file error #30

Closed mercurykd closed 2 years ago

mercurykd commented 3 years ago

windows 10 sublime 3

get('https://www.nationalgeographic.com/content/dam/animals/thumbs/rights-exempt/mammals/d/domestic-dog_thumb.jpg', filename='~/Desktop')

FileExistsError: [WinError 183] Невозможно создать файл, так как он уже существует: 'C:\Users\User\AppData\Roaming\Sublime Text 3\Packages\User\Requester.history.json.bkp'

Requester.history.json.bkp not delete after download.

kylebebak commented 2 years ago

There's no file at https://www.nationalgeographic.com/content/dam/animals/thumbs/rights-exempt/mammals/d/domestic-dog_thumb.jpg, and I can't repro with other image files

mercurykd commented 2 years ago

get('https://upload.wikimedia.org/wikipedia/commons/2/22/VTV_2013.png', filename='~/Desktop')

win11 x64, ST4126

Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\Sublime Text\Installed Packages\Requester.sublime-package\core/responses.py", line 145, in run
  File "./python3.3/concurrent/futures/_base.py", line 394, in result
  File "./python3.3/concurrent/futures/_base.py", line 353, in __get_result
  File "./python3.3/concurrent/futures/thread.py", line 54, in run
  File "C:\Users\User\AppData\Roaming\Sublime Text\Installed Packages\Requester.sublime-package\core/responses.py", line 66, in get_response
  File "C:\Users\User\AppData\Roaming\Sublime Text\Installed Packages\Requester.sublime-package\core/responses.py", line 108, in handle_special
  File "C:\Users\User\AppData\Roaming\Sublime Text\Installed Packages\Requester.sublime-package\commands/download.py", line 23, in __init__
  File "C:\Users\User\AppData\Roaming\Sublime Text\Installed Packages\Requester.sublime-package\commands/download.py", line 36, in run_initial_request
  File "C:\Users\User\AppData\Roaming\Sublime Text\Installed Packages\Requester.sublime-package\core/__init__.py", line 225, in persist_requests
  File "C:\Users\User\AppData\Roaming\Sublime Text\Installed Packages\Requester.sublime-package\core/__init__.py", line 401, in persist_requests
  File "C:\Users\User\AppData\Roaming\Sublime Text\Installed Packages\Requester.sublime-package\core/__init__.py", line 413, in write_json_file
FileExistsError: [WinError 183] Cannot create file because it already exists: 'C:\\Users\\User\\AppData\\Roaming\\Sublime Text\\Packages\\User\\Requester.history.json.bkp'