-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
good first tickethelp wantedsize: easystatus: doneWork is completed and released (or scheduled to be released in the next version)Work is completed and released (or scheduled to be released in the next version)touches: configuration
Description
Describe the bug
According to the Configuration wiki page, I should be able to change TEMPLATES_DIR to customize the layout. However, I cannot seem to change it.
Editing ArchiveBox.conf manually does nothing: archivebox config --get TEMPLATES_DIR and archivebox version still report the default path, which in my case (Arch Linux) is /usr/lib/python3.9/site-packages/archivebox/templates.
Trying to set it via archivebox config --set TEMPLATES_DIR=test produces the error:
[i] [2021-03-05 12:34:33] ArchiveBox v0.5.4: archivebox config --set TEMPLATES_DIR=test
> /srv/http/archivebox-data
Traceback (most recent call last):
File "/usr/bin/archivebox", line 33, in <module>
sys.exit(load_entry_point('archivebox==0.5.4', 'console_scripts', 'archivebox')())
File "/usr/lib/python3.9/site-packages/archivebox/cli/__init__.py", line 129, in main
run_subcommand(
File "/usr/lib/python3.9/site-packages/archivebox/cli/__init__.py", line 69, in run_subcommand
module.main(args=subcommand_args, stdin=stdin, pwd=pwd) # type: ignore
File "/usr/lib/python3.9/site-packages/archivebox/cli/archivebox_config.py", line 50, in main
config(
File "/usr/lib/python3.9/site-packages/archivebox/util.py", line 112, in typechecked_function
return func(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/archivebox/main.py", line 910, in config
matching_config = write_config_file(new_config, out_dir=OUTPUT_DIR)
File "/usr/lib/python3.9/site-packages/archivebox/config.py", line 469, in write_config_file
section = find_section(key)
File "/usr/lib/python3.9/site-packages/archivebox/config.py", line 465, in <lambda>
find_section = lambda key: [name for name, opts in CONFIG_SCHEMA.items() if key in opts][0]
IndexError: list index out of range
This could happen because TEMPLATES_DIR is not defined in CONFIG_SCHEMA (but don't take my word for it).
Thanks for your time and thanks for ArchiveBox!
ArchiveBox version
ArchiveBox v0.5.4
Cpython Linux Linux-5.11.1-arch1-1-x86_64-with-glibc2.33 x86_64 (not in Docker)
[i] Dependency versions:
√ ARCHIVEBOX_BINARY v0.5.4 valid /usr/bin/archivebox
√ PYTHON_BINARY v3.9.2 valid /usr/bin/python3.9
√ DJANGO_BINARY v3.1.7 valid /usr/lib/python3.9/site-packages/django/bin/django-admin.py
√ CURL_BINARY v7.75.0 valid /usr/bin/curl
√ WGET_BINARY v1.21.1 valid /usr/bin/wget
√ NODE_BINARY v12.20.1 valid /usr/bin/node
√ SINGLEFILE_BINARY v0.3.12 valid /usr/bin/single-file
- READABILITY_BINARY - disabled /usr/bin/readability-extractor
- MERCURY_BINARY - disabled /usr/bin/mercury-parser
- GIT_BINARY - disabled /usr/bin/git
√ YOUTUBEDL_BINARY v2021.02.22 valid /usr/bin/youtube-dl
√ CHROME_BINARY v89.0.4389.72 valid /usr/bin/chromium
√ RIPGREP_BINARY v12.1.1 valid /usr/bin/rg
[i] Source-code locations:
√ PACKAGE_DIR 23 files valid /usr/lib/python3.9/site-packages/archivebox
√ TEMPLATES_DIR 3 files valid /usr/lib/python3.9/site-packages/archivebox/templates
[i] Secrets locations:
- CHROME_USER_DATA_DIR - disabled
- COOKIES_FILE - disabled
[i] Data locations:
√ OUTPUT_DIR 9 files valid /srv/http/archivebox-data
√ SOURCES_DIR 8 files valid ./sources
√ LOGS_DIR 0 files valid ./logs
√ ARCHIVE_DIR 5 files valid ./archive
√ CONFIG_FILE 303.0 Bytes valid ./ArchiveBox.conf
√ SQL_INDEX 212.0 KB valid ./index.sqlite3
Metadata
Metadata
Assignees
Labels
good first tickethelp wantedsize: easystatus: doneWork is completed and released (or scheduled to be released in the next version)Work is completed and released (or scheduled to be released in the next version)touches: configuration