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: django branch start_ts error on init

See original GitHub issue

Describe the bug

When attempting to archivebox init with version 0.4.3 in old archive, archivebox fails at Collecting links from any existing indexes and archive folders... with KeyError: 'start_ts'

Steps to reproduce

  1. Installed Django branch with git clone and pip install ..
  2. Navigated to old archive directory.
  3. Ran archivebox init
  4. archivebox goes through most of importing process, and then dies with the error listed below.

Screenshots or log output

Traceback (most recent call last):
  File "/home/USERNAME/.local/bin/archivebox", line 8, in <module>
    sys.exit(main())
  File "/home/USERNAME/.local/lib/python3.7/site-packages/archivebox/cli/__init__.py", line 126, in main
    pwd=pwd or OUTPUT_DIR,
  File "/home/USERNAME/.local/lib/python3.7/site-packages/archivebox/cli/__init__.py", line 62, in run_subcommand
    module.main(args=subcommand_args, stdin=stdin, pwd=pwd)    # type: ignore
  File "/home/USERNAME/.local/lib/python3.7/site-packages/archivebox/cli/archivebox_init.py", line 34, in main
    out_dir=pwd or OUTPUT_DIR,
  File "/home/USERNAME/.local/lib/python3.7/site-packages/archivebox/util.py", line 108, in typechecked_function
    return func(*args, **kwargs)
  File "/home/USERNAME/.local/lib/python3.7/site-packages/archivebox/main.py", line 316, in init
    for link in load_main_index(out_dir=out_dir, warn=False)
  File "/home/USERNAME/.local/lib/python3.7/site-packages/archivebox/util.py", line 108, in typechecked_function
    return func(*args, **kwargs)
  File "/home/USERNAME/.local/lib/python3.7/site-packages/archivebox/index/__init__.py", line 250, in load_main_index
    all_links = list(parse_json_main_index(out_dir))
  File "/home/USERNAME/.local/lib/python3.7/site-packages/archivebox/index/json.py", line 52, in parse_json_main_index
    yield Link.from_json(link_json)
  File "/home/USERNAME/.local/lib/python3.7/site-packages/archivebox/index/schema.py", line 203, in from_json
    cast_result = ArchiveResult.from_json(json_result)
  File "/home/USERNAME/.local/lib/python3.7/site-packages/archivebox/index/schema.py", line 62, in from_json
    info['start_ts'] = parse_date(info['start_ts'])
KeyError: 'start_ts'

Software versions

  • OS: Ubuntu 18.04.4 LTS
  • ArchiveBox version: 848977e
  • Python version: Python 3.7.8

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
piratecommented, Jul 27, 2020

Awesome, that’s a relief to hear. We were worried it was a regression from the latest version. I’m going to close this issue for now but I’ll keep responding to your comments here, don’t worry.

If you post a ZIP (or email me email) of a handful of those swapped folders I’ll write you a bash script that fixes it.

1reaction
cdvv7788commented, Jul 24, 2020

@drpfenderson one more try please. Also, if you install it with pip install -e . you will always have installed the version of the code you are currently running (no need to pip install after changing branches i.e.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lines incorrectly reporting as not covered when running with ...
If you rerun it without "--branch" in the "coverage run" line they do not. If you add "assert False" at line 156, the...
Read more >
Django Error: __init__() takes 1 positional argument but 2 ...
I am new to Django and I'm trying to create my first project following a tutorial from Udemy, but I encounter this error....
Read more >
Hosting a Django Project on Heroku - Real Python
Heroku only deploys from either the remote main or master branches. If you've followed along and created your repository with the git init...
Read more >
8110 (Admin interface: 'long' object has no attribute 'isdigit')
We noiced that the error occures just when option Debug = false, and by changing it to true everything function normaly. Traceback (most...
Read more >
Bug #1829871 “zun-ui install collectstatic” - Launchpad Bugs
Bug #1829871 reported by fatis on 2019-05-21 ... File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 56, ...
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