[GH-ISSUE #228] ArchiveBox incorrectly identifies input source #3176

Closed
opened 2026-03-14 21:26:41 +03:00 by kerem · 1 comment
Owner

Originally created by @pigmonkey on GitHub (May 1, 2019).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/228

I always call ArchiveBox with a path to a Pinboard JSON file as an argument.

$ ./archive ~/library/conf/pinboard.json

From the terminal this works fine. However, when this is called by a systemd service (which is executed by a systemd timer), it fails:

Parsing new links from output/sources/stdin-1556669507.txt...
[X] No links found :(

The problem is the if not sys.stdin.isatty() conditional in bin/archivebox. When called via systemd, isatty() will return False, which causes ArchiveBox to assume that it should look to stdin for input (despite correctly identifying the input argument a few lines previously in the if len(args) == 2: check).

There should be another check to see if stdin is empty.

Originally created by @pigmonkey on GitHub (May 1, 2019). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/228 I always call ArchiveBox with a path to a Pinboard JSON file as an argument. $ ./archive ~/library/conf/pinboard.json From the terminal this works fine. However, when this is called by a systemd service (which is executed by a systemd timer), it fails: Parsing new links from output/sources/stdin-1556669507.txt... [X] No links found :( The problem is the `if not sys.stdin.isatty()` conditional in `bin/archivebox`. When called via systemd, `isatty()` will return `False`, which causes ArchiveBox to assume that it should look to `stdin` for input (despite correctly identifying the input argument a few lines previously in the `if len(args) == 2:` check). There should be another check to see if `stdin` is empty.
kerem closed this issue 2026-03-14 21:26:46 +03:00
Author
Owner

@pirate commented on GitHub (May 1, 2019):

Thanks, this is all refactored in v0.4.0 as well.

<!-- gh-comment-id:488207525 --> @pirate commented on GitHub (May 1, 2019): Thanks, this is all refactored in [v0.4.0](https://github.com/pirate/ArchiveBox/pull/207) as well.
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#3176
No description provided.