question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bugfix: docker oneshot doesn't appear to be working

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cdvv7788commented, 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.

1reaction
cdvv7788commented, Sep 24, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix and Debug Docker Containers Like a Superhero
Container errors are tricky to diagnose, but some investigative magic works wonders. Read along to learn how to debug Docker containers.
Read more >
1316786 – Docker can activate storage before LVM is ready ...
Doc Text: Cause: Sometimes docker-storage-setup service can start early and thin pool might not be ready yet. Consequence: docker-storage-setup can fail early ...
Read more >
One-shot containers with Docker Swarm - Alex Ellis' Blog
We'll look at some use-cases, a comparison to legacy Swarm (prior to 1.12) and then move onto some working examples of short-lived containers ......
Read more >
Propose better way to run docker from a unit file #6791 - GitHub
So now if I do either docker stop or systemctl stop things just work (at least they seem to do) and I don't...
Read more >
Control and configure Docker with systemd - the Docs
#TasksMax=infinity TimeoutStartSec=0 # set delegate yes so that systemd does not reset the cgroups of docker containers Delegate=yes # kill only the docker...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found