Skip to content

Bug: Download Hangs #235

@devvythelopper

Description

@devvythelopper

With the current HEAD of master 6e497fb, I am using the following command:

audible download --output-dir . --pdf --cover --annotation --chapter --chapter-type Flat --quality best --aaxc --all

to update my local copy of my library. I get a lot of "Skip download" and then suddenly audible hangs. Left it running over night, so I am sure it is hanging.

Within the log there are also two errors:

error: Server disconnected without sending a response.
...
error: Server disconnected without sending a response.

When running the command in an empty directory (so that the whole library starts to redownload), downloads work as they should. So the error is thrown only for specific audiobooks I have in my library. To find out which audiobook is a culprit, I modified audible-cli and added some logging (see pull request #234). It happens when downloading the "annotation" for the audiobook "Fooled by Randomness" (ASIN: B004V03DW2).

Audible does not hang if I use the command line flag --ignore-errors. So apparently when errors are raised in cmd_download.py...

async def consume(ignore_errors):
    while True:
        item, entity_type, cmd, kwargs = await QUEUE.get()
        try:
            logger.info(f"--- Downloading {entity_type} for: {item.asin}: {item.title}")
            await cmd(**kwargs)
        except Exception as e:
            logger.error(e)
            if not ignore_errors:
                raise
        finally:
            QUEUE.task_done()

... the raised exception seems not to be handled correctly.

Also, I suppose there should not be an exception in the first place but the annotation downloading command should handle whatever happens gracefully.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions