mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
10.68k stars 881 forks source link

[KemonoParty] TypeError - '<' not supported between instances of 'NoneType' and 'str'. #5692

Closed bossanovaorca closed 3 weeks ago

bossanovaorca commented 3 weeks ago

when I run gallery-dl on my kemono party favorites (https://kemono.su/favorites), it seems to error out when it reaches a user with no uploads. I was able to get around the issue by unfavoriting the user before running gallery-dl, but ideally I think gallery-dl should handle this case so that we can favorite artists while waiting for uploads to appear in the future. Here is the verbose error log:

> gallery-dl.exe https://kemono.su/favorites --verbose
[gallery-dl][debug] Version 1.27.0 - Executable (stable/windows)
[gallery-dl][debug] Python 3.8.10 - Windows-10-10.0.19045
[gallery-dl][debug] requests 2.31.0 - urllib3 2.1.0
[gallery-dl][debug] Configuration Files ['%USERPROFILE%\\gallery-dl\\config.json', 'C:\\Users\\COMPUTER\\scoop\\apps\\gallery-dl\\current\\gallery-dl.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://kemono.su/favorites'
[kemonoparty][debug] Using KemonopartyFavoriteExtractor for 'https://kemono.su/favorites'
[kemonoparty][debug] Sleeping 10.00 seconds (extractor)
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): kemono.su:443
[urllib3.connectionpool][debug] https://kemono.su:443 "GET /api/v1/account/favorites?type=artist HTTP/1.1" 200 None
[kemonoparty][error] An unexpected error occurred: TypeError - '<' not supported between instances of 'NoneType' and 'str'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[kemonoparty][debug]
Traceback (most recent call last):
  File "gallery_dl\job.pyc", line 150, in run
  File "gallery_dl\extractor\kemonoparty.pyc", line 521, in items
TypeError: '<' not supported between instances of 'NoneType' and 'str'

running gallery-dl directly on the empty account (https://kemono.su/gumroad/user/shengtian) seems to handle it just fine so I may be wrong with my assumption

> gallery-dl.exe https://kemono.su/gumroad/user/shengtian --verbose
[gallery-dl][debug] Version 1.27.0 - Executable (stable/windows)
[gallery-dl][debug] Python 3.8.10 - Windows-10-10.0.19045
[gallery-dl][debug] requests 2.31.0 - urllib3 2.1.0
[gallery-dl][debug] Configuration Files ['%USERPROFILE%\\gallery-dl\\config.json', 'C:\\Users\\COMPUTER\\scoop\\apps\\gallery-dl\\current\\gallery-dl.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://kemono.su/gumroad/user/shengtian'
[kemonoparty][debug] Using KemonopartyUserExtractor for 'https://kemono.su/gumroad/user/shengtian'
[kemonoparty][debug] Sleeping 10.00 seconds (extractor)
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): kemono.su:443
[urllib3.connectionpool][debug] https://kemono.su:443 "GET /api/v1/gumroad/user/shengtian?o=0 HTTP/1.1" 200 22
[kemonoparty][info] No results for https://kemono.su/gumroad/user/shengtian
mikf commented 3 weeks ago

Fixed in https://github.com/mikf/gallery-dl/commit/2cab87c5b6e434892a2521d6b9d48fc9625b78a7