persepolisdm / persepolis

Persepolis is a download manager written in Python.
https://persepolisdm.github.io
GNU General Public License v3.0
6.26k stars 653 forks source link

Resume on download progress which got error #773

Open AmirHosseinKarimi opened 4 years ago

AmirHosseinKarimi commented 4 years ago

System Details:

Issue Description and steps to reproduce: refer to #772 and #771 When download progress got error because of download link expiration, if user resume the download again usually the website of hosting file show file download page or error page In this situation Persepolis will download that page instead to reject the redirect or do not accept of file change... and it will lost the original file and download web page and show download complete message. The original file with large size will be lost and user should start over to download the file.

**********

ffmpeg version 4.1.4-1~deb10u1 Copyright (c) 2000-2019 the FFmpeg

developers built with gcc 8 (Debian 8.3.0-6) configuration:

--prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened

--libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-

gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample

--disable-filter=resample --enable-avisynth --enable-gnutls --enable-

ladspa --enable-libaom --enable-libass --enable-libbluray --enable-

libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-

libflite --enable-libfontconfig --enable-libfreetype --enable-

libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-

libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt

--enable-libopus --enable-libpulse --enable-librsvg --enable-

librubberband --enable-libshine --enable-libsnappy --enable-libsoxr

--enable-libspeex --enable-libssh --enable-libtheora --enable-

libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx

--enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2

--enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2

--enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-

libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint

--enable-frei0r --enable-libx264 --enable-shared libavutil      56.

22.100 / 56. 22.100 libavcodec     58. 35.100 / 58. 35.100 libavformat

58. 20.100 / 58. 20.100 libavdevice    58.  5.100 / 58.  5.100

libavfilter     7. 40.101 /  7. 40.101 libavresample   4.  0.  0 /  4.

0.  0 libswscale      5.  3.100 /  5.  3.100 libswresample   3.  3.100

/  3.  3.100 libpostproc    55.  3.100 / 55.  3.100

**********

2020-03-25 14:11:40,044 - Persepolis - INFO - python version: 3.7.3 (default, Dec 20 2019, 18:57:59) 

[GCC 8.3.0]

2020-03-25 14:11:40,044 - Persepolis - INFO - QT version: 5.11.3

2020-03-25 14:11:40,045 - Persepolis - INFO - PyQt version: 5.11.3

2020-03-25 14:11:40,045 - Persepolis - INFO - Operating system: Linux

2020-03-25 14:11:40,045 - Persepolis - INFO - Desktop env.: GNOME

2020-03-25 14:11:40,748 - Persepolis - INFO - Aria2 is running

2020-03-25 14:11:40,748 - Persepolis - INFO - Aria2 version: 1.34.0

2020-03-25 14:14:11,223 - Persepolis - INFO - 561ab0f187e5d36f Starts

2020-03-25 14:20:20,983 - Persepolis - INFO - 561ab0f187e5d36f paused

2020-03-25 14:21:47,896 - Persepolis - INFO - Download speed limit  value is changed

2020-03-25 14:21:49,155 - Persepolis - INFO - 561ab0f187e5d36f unpaused

2020-03-25 14:21:50,576 - Persepolis - ERROR - Download failed - GID : 561ab0f187e5d36f- Message : Size mismatch Expected:1073741824 Actual:0

2020-03-25 14:21:58,901 - Persepolis - ERROR - Download did not start

2020-03-25 14:21:58,908 - Persepolis - ERROR - Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/persepolis/scripts/download.py", line 284, in downloadAria

    answer = server.aria2.addUri([link], aria_dict)

  File "/usr/lib/python3.7/xmlrpc/client.py", line 1112, in __call__

    return self.__send(self.__name, args)

  File "/usr/lib/python3.7/xmlrpc/client.py", line 1452, in __request

    verbose=self.__verbose

  File "/usr/lib/python3.7/xmlrpc/client.py", line 1154, in request

    return self.single_request(host, handler, request_body, verbose)

  File "/usr/lib/python3.7/xmlrpc/client.py", line 1166, in single_request

    http_conn = self.send_request(host, handler, request_body, verbose)

  File "/usr/lib/python3.7/xmlrpc/client.py", line 1272, in send_request

    connection.putrequest("POST", handler, skip_accept_encoding=True)

  File "/usr/lib/python3.7/http/client.py", line 1108, in putrequest

    raise CannotSendRequest(self.__state)

http.client.CannotSendRequest: Request-sent

2020-03-25 14:21:59,119 - Persepolis - ERROR - Download failed - GID : 561ab0f187e5d36f- Message : Error

2020-03-25 14:22:02,673 - Persepolis - INFO - 561ab0f187e5d36f Starts

2020-03-25 14:22:04,237 - Persepolis - INFO - Download complete - GID : 561ab0f187e5d36f