Closed Kristinita closed 5 years ago
A quick glance at load_handlers
leads me to believe the error has something to do with path handling. I haven't tested it, but this should resolve the issue:
from pathlib import Path
PATH = Path(os.path.dirname(os.path.abspath(__file__)))
PATH_HANDLER = PATH / 'handlers'
def load_handlers():
global handlers
handlers = {}
# add the path of the handlers to the system so they can be imported
sys.path.append(str(PATH_HANDLER))
# create a list of handlers.
for file in PATH_HANDLER.glob('*_handler.py'):
name = file.stem
prefix = name.replace('_handler', '')
mod = importlib.import_module(name)
mod_class = getattr(mod, prefix.upper() + '_handler')
# finally an object is created
handlers[prefix] = mod_class()
# exclude all disabled archives
for handler in list(handlers): # handlers.keys():
if not handlers[handler].enabled:
del handlers[handler]
Status: :heavy_check_mark: Fixed for me
Thanks.
1. Summary
I can't begin to use archivenow CLI on my Windows.
2. Environment
3. Steps to reproduce
I install archivenow to virtual environment:
I try run commands as in examples.
4. Expected behavior
Save web-pages on archiving services.
5. Actual behavior
I get
Error: No enabled archive handler found
any time.Thanks.