Closed
Description
Prerequisites
- Did you read FAQ section in readme.md?
- Did you test with the latest releases or commit ?
- Did you search for existing issues in Issues?
Description
Non-interactive bookmark downloading (option 8) is broken in 20240703 as it tries to run len()
on an integer, most likely len(-1)
as that seems to be the default for --bcl
/ --bookmark_count_limit
, which is not a valid operation in Python.
This can be worked around by adding the bookmark count limit explicitly (for example --bcl=-1
), as that will supply the value as a string instead, but there's really no way to figure it out without reading the source code.
Most likely broken by #1324.
Steps to Reproduce
- Run PixivUtil2 with
-s 8 --ep=3 -x
arguments.
Expected behavior:
Three first bookmarked pages are downloaded.
Login successful.
My User Id: xxxxxxx.
Premium User: False.
End Page = 3
Processing New Illust from bookmark
Page #1
Image #1
Processing Image Id: xxxxxxxxx
[...]
Limit or last page reached.
Done.
Actual behavior:
PixivUtil2 crashes immediately after login.
Login successful.
My User Id: xxxxxxx.
Premium User: False.
End Page = 3
Traceback (most recent call last):
File "/PixivUtil2.py", line 1745, in main
np_is_valid, op_is_valid, selection = main_loop(ewd, op_is_valid, selection, np_is_valid, args, options)
File "/PixivUtil2.py", line 1422, in main_loop
menu_download_new_illust_from_bookmark(op_is_valid, args, options)
File "/PixivUtil2.py", line 648, in menu_download_new_illust_from_bookmark
if bookmark_count is not None and len(bookmark_count) > 0:
TypeError: object of type 'int' has no len()
Unknown Error, please check the log file: (<class 'TypeError'>, TypeError("object of type 'int' has no len()"), <traceback object at 0x7f22113ff080>)
Versions
Broken in 20240703. Worked in 20230105.
I am running PixivUtil2 using my own Docker container, but it shouldn't really affect anything.
Metadata
Assignees
Labels
No labels