# Buggy code
def process_bookmark(hide="n", start_page=1, end_page=0):
    try:
        total_list = list()
        if hide != "o":
            print("Importing Bookmarks...")
            total_list.extend(get_bookmarks(False, start_page, end_page))
        if hide != "n":
            print("Importing Private Bookmarks...")
            total_list.extend(get_bookmarks(True, start_page, end_page))
        print("Result: ", str(len(total_list)), "items.")
        i = 0
        current_member = 1
        for item in total_list:
            print(
                "%d/%d\t%f %%"
                % (i, len(total_list), 100.0 * i / float(len(total_list)))
            )
            i += 1
            prefix = "[{0} of {1}]".format(current_member, len(total_list))
            process_member(item.memberId, item.path, title_prefix=prefix)
            current_member = current_member + 1
        print("%d/%d\t%f %%" % (i, len(total_list), 100.0 * i / float(len(total_list))))
    except KeyboardInterrupt:
        raise
    except BaseException:
        PixivHelper.print_and_log(
            "error", "Error at process_bookmark(): {0}".format(sys.exc_info())
        )
        raise


# Traceback (ZeroDivisionError)
Input: 5
Include Private bookmarks [y/n/o]:
Start Page (default=1):
End Page (default=0, 0 for no limit):
Importing Bookmarks...
Exporting page 1
Source URL: https://www.pixiv.net/bookmark.php?type=user&amp;p=1
Using default DB Path: /mnt/c/PixivUtil2/db.sqlite
No more data
Result:  0 items.
Error at process_bookmark(): (<class 'ZeroDivisionError'>, ZeroDivisionError('float division by zero'), <traceback object at 0x7fa7885a55a0>)
Traceback (most recent call last):
File "PixivUtil2.py", line 2407, in main
np_is_valid, op_is_valid, selection = main_loop(ewd, op_is_valid, selection, np_is_valid, args)
File "PixivUtil2.py", line 2127, in main_loop
menu_download_from_online_user_bookmark(op_is_valid, args)
File "PixivUtil2.py", line 1722, in menu_download_from_online_user_bookmark
process_bookmark(hide, start_page, end_page)
File "PixivUtil2.py", line 1235, in process_bookmark
print("%d/%d\t%f %%" % (i, len(total_list), 100.0 * i / float(len(total_list))))
ZeroDivisionError: float division by zero
press enter to exit.

# Fixed code
def process_bookmark(hide="n", start_page=1, end_page=0):
    try:
        total_list = list()
        print(f"My Member Id = {__br__._myId}")
        if hide != "o":
            print("Importing Bookmarks...")
            total_list.extend(get_bookmarks(False, start_page, end_page, __br__._myId))
        if hide != "n":
            print("Importing Private Bookmarks...")
            total_list.extend(get_bookmarks(True, start_page, end_page, __br__._myId))
        print(f"Result: {str(len(total_list))} items.")
        i = 0
        current_member = 1
        for item in total_list:
            print(
                "%d/%d\t%f %%"
                % (i, len(total_list), 100.0 * i / float(len(total_list)))
            )
            i += 1
            prefix = "[{0} of {1}]".format(current_member, len(total_list))
            process_member(item.memberId, item.path, title_prefix=prefix)
            current_member = current_member + 1

        if len(total_list) > 0:
            print(
                "%d/%d\t%f %%"
                % (i, len(total_list), 100.0 * i / float(len(total_list)))
            )
        else:
            print("Cannot find any followed member.")
    except KeyboardInterrupt:
        raise
    except BaseException:
        PixivHelper.print_and_log(
            "error", "Error at process_bookmark(): {0}".format(sys.exc_info())
        )
        raise