PixivUtil2
PixivUtil2 copied to clipboard
Suggest adding error correction code by Ugoira process
Prerequisites
- [x] Did you read FAQ section in readme.md?
- [x] Did you test with the latest releases or commit ?
- [x] Did you search for existing issues in Issues?
Description
[Description of the bug or feature]
Steps to Reproduce
- Frame image of Ugoira corrupted
- Corrupted image file included in zip file
- Subsequent processes fail with a zipfile.badzipfile error
Expected behavior: This error occurs continuously even with the config.ini's overwrite= True.
Actual behavior: Although the overwrite= true, the zip file containing the corrupted image is not overwritten, resulting in continuous errors.
Log file
2022-11-06 11:10:09,135 - PixivUtil20221029 - ERROR - Error at process_image(): 102015673 2022-11-06 11:10:09,136 - PixivUtil20221029 - ERROR - Traceback (most recent call last): File "PixivImageHandler.pyc", line 336, in process_image File "PixivDownloadHandler.pyc", line 395, in handle_ugoira File "PixivHelper.pyc", line 971, in ugoira2gif File "PixivHelper.pyc", line 1042, in convert_ugoira File "zipfile.pyc", line 1645, in extractall File "zipfile.pyc", line 1700, in _extract_member File "shutil.pyc", line 195, in copyfileobj File "zipfile.pyc", line 925, in read File "zipfile.pyc", line 1015, in _read1 File "zipfile.pyc", line 943, in _update_crc zipfile.BadZipFile: Bad CRC-32 for file '000012.jpg'
Versions
Latest Version
Always thank you for your working.
We'd ideally need the log of that ugoria id being downloaded and merged into a .ugoria file. Else you just need to clean that id from the database, delete the original files, and just redownload it.
I suppose code to prevent the Ugoria from being created should one part of the download fails would also be ideal in this situation.
The validation check is already there though: https://github.com/Nandaka/PixivUtil2/blob/master/PixivDownloadHandler.py#L220
You need to set verifyImage = True in config.ini