[GH-ISSUE #89] AttributeError: 'DownloadConnectionError' object has no attribute 'message' #18

Open
opened 2026-10-13 19:45:48 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @spapost on GitHub (Jan 10, 2026).
Original GitHub issue: https://github.com/Glitchy-Sheep/boosty-downloader/issues/89

When encountering a problem with downloading a file, download_single_file.py fails during exception DownloadError, since e.message isn't defined at the stage

    except DownloadError as e:
        if e.file:
            e.file.unlink(missing_ok=True)
        await self.context.failed_logger.add_error(
            f'{_form_post_url(username=self.context.author_name, post_id=post.uuid)} - {e.resource_url}',
            f'Failed to download file ({e.file}): {e.message}',
        )
Originally created by @spapost on GitHub (Jan 10, 2026). Original GitHub issue: https://github.com/Glitchy-Sheep/boosty-downloader/issues/89 When encountering a problem with downloading a file, download_single_file.py fails during exception DownloadError, since e.message isn't defined at the stage except DownloadError as e: if e.file: e.file.unlink(missing_ok=True) await self.context.failed_logger.add_error( f'{_form_post_url(username=self.context.author_name, post_id=post.uuid)} - {e.resource_url}', f'Failed to download file ({e.file}): {e.message}', )
Author
Owner

@Mifody-07 commented on GitHub (Mar 9, 2026):

English:

Confirmed this bug on version 2.1.1.

The fix is simple — in download_single_post.py line 246, replace e.message with e.resource_url:

# Before
f'Failed to download file ({e.file}): {e.message}',

# After  
f'Failed to download file ({e.file}): {e.resource_url}',

After this fix the downloader correctly handles connection errors and retries instead of crashing.


Русский:

Подтверждаю баг на версии 2.1.1.

Фикс простой — в файле download_single_post.py строка 246, заменить e.message на e.resource_url:

# До
f'Failed to download file ({e.file}): {e.message}',

# После
f'Failed to download file ({e.file}): {e.resource_url}',

После этого фикса загрузчик корректно обрабатывает обрыв соединения и делает повторные попытки вместо падения.

<!-- gh-comment-id:4022665865 --> @Mifody-07 commented on GitHub (Mar 9, 2026): **English:** Confirmed this bug on version 2.1.1. The fix is simple — in `download_single_post.py` line 246, replace `e.message` with `e.resource_url`: ```python # Before f'Failed to download file ({e.file}): {e.message}', # After f'Failed to download file ({e.file}): {e.resource_url}', ``` After this fix the downloader correctly handles connection errors and retries instead of crashing. --- **Русский:** Подтверждаю баг на версии 2.1.1. Фикс простой — в файле `download_single_post.py` строка 246, заменить `e.message` на `e.resource_url`: ```python # До f'Failed to download file ({e.file}): {e.message}', # После f'Failed to download file ({e.file}): {e.resource_url}', ``` После этого фикса загрузчик корректно обрабатывает обрыв соединения и делает повторные попытки вместо падения.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#18
No description provided.