bitdruid / python-wayback-machine-downloader

Query and download archive.org as simple as possible.
MIT License
33 stars 2 forks source link

dev crash `can only concatenate str (not "NoneType") to str` #13

Closed Ghost-chu closed 5 months ago

Ghost-chu commented 5 months ago
def download_exception(type, e, i, max_retries, sleep_time, status_message):
    """
    Handle exceptions during the download process.
    """
    type = e.__class__.__name__.upper()
    status_message = f"{status_message}\n" + \
        f"{type} -> ({i+1}/{max_retries}), reconnect in {sleep_time} seconds...\n" + \  #<-- The ends `+ \` cause the crash because it actually not connected to another str
    vb.write(status_message)
    time.sleep(sleep_time)
bitdruid commented 5 months ago

thank you :)