When using docker, oneshot seems broken.
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'
ArchiveBox v0.4.21 using the latest docker-compose.yml
Yes. It seems like it is not working as expected. I will fix it asap.
@poblabs I created a PR that should help with the command. Things to note:
--out-dir option to better manage where to send the output of the commandThanks! I downloaded your branch with the fix to test it, but docker isn't building. I'll keep trying it
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.
@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.