[GH-ISSUE #484] Bugfix: docker oneshot doesn't appear to be working #318

Closed
opened 2026-03-01 14:42:24 +03:00 by kerem · 5 comments
Owner

Originally created by @poblabs on GitHub (Sep 24, 2020).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/484

Describe the bug

When using docker, oneshot seems broken.

Steps to reproduce

Open the container CLI, run archivebox oneshot "http://website", or run it using docker-compose run archivebox oneshot ... and it outputs:

    ! Failed to archive link: TypeError: __init__() missing 4 required positional arguments: 'timestamp', 'url', 'title', and 'tags'
Traceback (most recent call last):
  File "/usr/local/bin/archivebox", line 33, in <module>
    sys.exit(load_entry_point('archivebox', 'console_scripts', 'archivebox')())
  File "/app/archivebox/cli/__init__.py", line 122, in main
    run_subcommand(
  File "/app/archivebox/cli/__init__.py", line 62, in run_subcommand
    module.main(args=subcommand_args, stdin=stdin, pwd=pwd)    # type: ignore
  File "/app/archivebox/cli/archivebox_oneshot.py", line 55, in main
    oneshot(
  File "/app/archivebox/util.py", line 112, in typechecked_function
    return func(*args, **kwargs)
  File "/app/archivebox/main.py", line 506, in oneshot
    archive_link(oneshot_link[0], out_dir=out_dir, methods=methods, skip_index=True)
  File "/app/archivebox/util.py", line 112, in typechecked_function
    return func(*args, **kwargs)
  File "/app/archivebox/extractors/__init__.py", line 82, in archive_link
    link = load_link_details(link, out_dir=out_dir)
  File "/app/archivebox/util.py", line 112, in typechecked_function
    return func(*args, **kwargs)
  File "/app/archivebox/index/__init__.py", line 363, in load_link_details
    existing_link = parse_json_link_details(out_dir)
  File "/app/archivebox/util.py", line 112, in typechecked_function
    return func(*args, **kwargs)
  File "/app/archivebox/index/json.py", line 111, in parse_json_link_details
    return Link.from_json(link_json, guess)
  File "/app/archivebox/index/schema.py", line 234, in from_json
    return cls(**info)
TypeError: __init__() missing 4 required positional arguments: 'timestamp', 'url', 'title', and 'tags'

Software versions

ArchiveBox v0.4.21 using the latest docker-compose.yml

Originally created by @poblabs on GitHub (Sep 24, 2020). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/484 #### Describe the bug When using docker, oneshot seems broken. #### Steps to reproduce Open the container CLI, run `archivebox oneshot "http://website"`, or run it using `docker-compose run archivebox oneshot ...` and it outputs: ``` ! Failed to archive link: TypeError: __init__() missing 4 required positional arguments: 'timestamp', 'url', 'title', and 'tags' Traceback (most recent call last): File "/usr/local/bin/archivebox", line 33, in <module> sys.exit(load_entry_point('archivebox', 'console_scripts', 'archivebox')()) File "/app/archivebox/cli/__init__.py", line 122, in main run_subcommand( File "/app/archivebox/cli/__init__.py", line 62, in run_subcommand module.main(args=subcommand_args, stdin=stdin, pwd=pwd) # type: ignore File "/app/archivebox/cli/archivebox_oneshot.py", line 55, in main oneshot( File "/app/archivebox/util.py", line 112, in typechecked_function return func(*args, **kwargs) File "/app/archivebox/main.py", line 506, in oneshot archive_link(oneshot_link[0], out_dir=out_dir, methods=methods, skip_index=True) File "/app/archivebox/util.py", line 112, in typechecked_function return func(*args, **kwargs) File "/app/archivebox/extractors/__init__.py", line 82, in archive_link link = load_link_details(link, out_dir=out_dir) File "/app/archivebox/util.py", line 112, in typechecked_function return func(*args, **kwargs) File "/app/archivebox/index/__init__.py", line 363, in load_link_details existing_link = parse_json_link_details(out_dir) File "/app/archivebox/util.py", line 112, in typechecked_function return func(*args, **kwargs) File "/app/archivebox/index/json.py", line 111, in parse_json_link_details return Link.from_json(link_json, guess) File "/app/archivebox/index/schema.py", line 234, in from_json return cls(**info) TypeError: __init__() missing 4 required positional arguments: 'timestamp', 'url', 'title', and 'tags' ``` #### Software versions ArchiveBox v0.4.21 using the latest docker-compose.yml
kerem closed this issue 2026-03-01 14:42:24 +03:00
Author
Owner

@cdvv7788 commented on GitHub (Sep 24, 2020):

Yes. It seems like it is not working as expected. I will fix it asap.

<!-- gh-comment-id:698443009 --> @cdvv7788 commented on GitHub (Sep 24, 2020): Yes. It seems like it is not working as expected. I will fix it asap.
Author
Owner

@cdvv7788 commented on GitHub (Sep 24, 2020):

@poblabs I created a PR that should help with the command. Things to note:

  • The oneshot command should be ran in an empty folder, or it will try to download the archive in the current folder
  • You can use the --out-dir option to better manage where to send the output of the command
<!-- gh-comment-id:698460295 --> @cdvv7788 commented on GitHub (Sep 24, 2020): @poblabs I created a PR that should help with the command. Things to note: - The oneshot command should be ran in an empty folder, or it will try to download the archive in the current folder - You can use the `--out-dir` option to better manage where to send the output of the command
Author
Owner

@poblabs commented on GitHub (Sep 24, 2020):

Thanks! I downloaded your branch with the fix to test it, but docker isn't building. I'll keep trying it

<!-- gh-comment-id:698476842 --> @poblabs commented on GitHub (Sep 24, 2020): Thanks! I downloaded your branch with the fix to test it, but docker isn't building. I'll keep trying it
Author
Owner

@cdvv7788 commented on GitHub (Sep 24, 2020):

Oh, master is not working at the moment. https://github.com/pirate/ArchiveBox/pull/482 after this PR is merged, I will rebase and it should start working again.

<!-- gh-comment-id:698480018 --> @cdvv7788 commented on GitHub (Sep 24, 2020): Oh, master is not working at the moment. https://github.com/pirate/ArchiveBox/pull/482 after this PR is merged, I will rebase and it should start working again.
Author
Owner

@cdvv7788 commented on GitHub (Sep 24, 2020):

@poblabs please check again with master. The fix has been merged and should work properly now. Let me know if it still fails to reopen this.

<!-- gh-comment-id:698496716 --> @cdvv7788 commented on GitHub (Sep 24, 2020): @poblabs please check again with `master`. The fix has been merged and should work properly now. Let me know if it still fails to reopen this.
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#318
No description provided.