[GH-ISSUE #406] Exception ignored in: io.TextIOWrapper(stdout) BrokenPipeError: [Errno 32] Broken pipe #268

Closed
opened 2026-03-01 14:41:59 +03:00 by kerem · 3 comments
Owner

Originally created by @pirate on GitHub (Jul 30, 2020).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/406

Describe the bug

This bug is completely harmless and is visual-only, it can be avoided by setting SHOW_PROGRESS=False.

A macOS-specific bug where the subprocess handler gets killed before the stdout is finished flushing. It catches the exception, but prints it to stderr instead of bubbling up back to user code, so it's impossible to catch and silence from python without monkey patching python internals or doing something crazy.

I've already lost dozens of hours trying to get rid of this, at the moment the only fix is adding a 1sec delay after the process kill, slowing down archiving a lot, or by setting SHOW_PROGRESS=False and skipping the subprocess entirely.

Screenshots or log output

image

Software versions

  • OS: macOS 10.15
  • ArchiveBox version: v0.4.9
  • Python version: v3.8.5
  • Chrome version: v84.x.x
Originally created by @pirate on GitHub (Jul 30, 2020). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/406 <!-- Please fill out the following information, feel free to delete sections if they're not applicable or if long issue templates annoy you :) --> #### Describe the bug *This bug is completely harmless and is visual-only, it can be avoided by setting `SHOW_PROGRESS=False`.* A macOS-specific bug where the subprocess handler gets killed before the stdout is finished flushing. It catches the exception, but prints it to stderr instead of bubbling up back to user code, so it's impossible to catch and silence from python without monkey patching python internals or doing something crazy. I've already lost dozens of hours trying to get rid of this, at the moment the only fix is adding a 1sec delay after the process kill, slowing down archiving a lot, or by setting `SHOW_PROGRESS=False` and skipping the subprocess entirely. #### Screenshots or log output <!-- If applicable, post any relevant screenshots or copy/pasted terminal output from ArchiveBox. If you're reporting a parsing / importing error, **you must paste a copy of your redacted import file here**. --> ![image](https://user-images.githubusercontent.com/511499/88972435-89a40d00-d283-11ea-96a5-5a7ae26d7b11.png) #### Software versions - OS: macOS 10.15 - ArchiveBox version: v0.4.9 - Python version: v3.8.5 - Chrome version: v84.x.x
kerem 2026-03-01 14:41:59 +03:00
Author
Owner

@ryanpcmcquen commented on GitHub (Aug 4, 2020):

I've been hit by this as well. What is the effect of this bug?

<!-- gh-comment-id:668757038 --> @ryanpcmcquen commented on GitHub (Aug 4, 2020): I've been hit by this as well. What is the effect of this bug?
Author
Owner

@cdvv7788 commented on GitHub (Aug 4, 2020):

It is just something visual, should not affect the behavior of archivebox in any other way.

<!-- gh-comment-id:668760752 --> @cdvv7788 commented on GitHub (Aug 4, 2020): It is just something visual, should not affect the behavior of `archivebox` in any other way.
Author
Owner

@pirate commented on GitHub (Oct 31, 2020):

Fixed 🎉 7d4738a

<!-- gh-comment-id:720002362 --> @pirate commented on GitHub (Oct 31, 2020): Fixed 🎉 7d4738a
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
starred/ArchiveBox#268
No description provided.