iTaybb / pySmartDL

A Smart Download Manager for Python
The Unlicense
198 stars 56 forks source link

Downloading error in python 3.8 #44

Open stdnoerr opened 4 years ago

stdnoerr commented 4 years ago

[INFO||7032@{C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\pySmartDL.py:100}] Using url "https://rarlab.com//rar/winrar-x64-590b3nl.exe" [WARNING||7032@{C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\pySmartDL.py:137}] Destination "C:\Users\<username>\AppData\Local\Temp\pySmartDL\" already exists. Existing file will be removed. [INFO||7032@{C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\pySmartDL.py:142}] Creating a ThreadPool of 5 thread(s). [INFO||7032@{C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\pySmartDL.py:236}] Starting a new SmartDL operation. [INFO||7032@{C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\pySmartDL.py:246}] One URL is loaded. [INFO||7032@{C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\pySmartDL.py:254}] Downloading 'https://rarlab.com//rar/winrar-x64-590b3nl.exe' to 'C:\Users\<username>\AppData\Local\Temp\pySmartDL\'... [INFO||7032@{C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\pySmartDL.py:275}] Content-Length is 3554136 (3.4 MB). [INFO||7032@{C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\pySmartDL.py:285}] Launching 1 thread (downloads 3.4 MB). [INFO||9072@{C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\download.py:13}] Downloading 'https://rarlab.com//rar/winrar-x64-590b3nl.exe' to 'C:\Users\<username>\AppData\Local\Temp\pySmartDL\.000'... [INFO||3880@{C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\control_thread.py:29}] Control thread has been started. [*] 3.4 MB / 3.4 MB @ 80 kB/s [##################] [100%, 0s left] Exception in thread Thread-1: Traceback (most recent call last): File "C:\Program Files\Python38\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Program Files\Python38\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\pySmartDL.py", line 654, in post_threadpool_actions utils.combine_files(*args) File "C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\utils.py", line 32, in combine_files shutil.move(parts[0], dest) File "C:\Program Files\Python38\lib\shutil.py", line 786, in move raise Error("Destination path '%s' already exists" % real_dst) shutil.Error: Destination path 'C:\Users\<username>\AppData\Local\Temp\pySmartDL\.000' already exists [INFO||3880@{C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages\pySmartDL\control_thread.py:64}] File downloaded within 16.62 seconds.

It gives above error. It downloads the part in the said directory then try to move it in the same directory which results in the above Exception.

erb13020 commented 4 years ago

Can you share your code, please?

stdnoerr commented 4 years ago

Unfortunately, I don't have the code now. I ended up making a tiny downloader for my self. A class with progress bar but main code from urllib.