I tried to save this relatively simple blog post, and got a TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'float' error
Steps to reproduce the behavior:
echo "http://www.offconvex.org/2019/03/19/CURL/" | ./archive➜ ArchiveBox git:(master) echo "http://www.offconvex.org/2019/03/19/CURL/" | ./archive
[*] [2019-03-21 09:08:42] Parsing new links from output/sources/stdin-1553177320.txt...
> Adding 1 new links to index (parsed import as Plain Text)
[*] [2019-03-21 09:08:42] Saving main index files...
√ output/index.json
√ output/index.html
[â–¶] [2019-03-21 09:08:42] Updating content for 3 pages in archive...
[+] [2019-03-21 09:08:42] "http://www.offconvex.org/2019/03/19/CURL/"
http://www.offconvex.org/2019/03/19/CURL/
> output/archive/1553177322 (new)
> title
> favicon
> wget
> pdf
> screenshot
> dom
> media
> archive_org
[*] [2019-03-21 09:09:08] "Activation Atlas"
https://distill.pub/2019/activation-atlas/
> output/archive/1552175337
[*] [2019-03-21 09:09:08] "Example Domain"
https://example.com
> output/archive/1552175279
Traceback (most recent call last):
File "./archive", line 132, in <module>
main(*sys.argv)
File "./archive", line 93, in main
update_archive_data(import_path=import_path, resume=resume)
File "./archive", line 124, in update_archive_data
log_archiving_finished(len(links))
File "/Users/diegomesa/src/ArchiveBox/archivebox/logs.py", line 158, in log_archiving_finished
seconds = end_ts - _LAST_RUN_STATS['start_ts'].timestamp()
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'float'
(please complete the following information)
git rev-parse HEAD | head -c7 : d798117Yeah sorry about this, pushed a refactor too fast last night without testing thoroughly. I'll have this fixed today.
I also encountered this one just now.
@simon987 beat me to the fix. Try it now.
It seems to work now. Although the application exits with a non-zero code. This is the last output:
[√] [2019-03-22 08:41:31] Update of 2 pages complete (10.46 sec)
- 0 entries skipped
Traceback (most recent call last):
File "./archive", line 132, in <module>
main(*sys.argv)
File "./archive", line 93, in main
update_archive_data(import_path=import_path, resume=resume)
File "./archive", line 124, in update_archive_data
log_archiving_finished(len(links))
File "/home/dominique/Documents/projects/ArchiveBox/archivebox/logs.py", line 172, in log_archiving_finished
print(' - {} entries updated'.format(_LAST_RUN_STATS['succeded']))
KeyError: 'succeded'
$ echo $?
1
Is this intentional?
@NullEnt1ty This is a typo, I made a different PR for that: #187
I recently experienced this but I'm guessing the PR will fix it.
Just merged @simon987's PR, thanks for reporting @n0ncetonic and @NullEnt1ty! Comment back if you're still having problems and I'll reopen it.
Most helpful comment
Yeah sorry about this, pushed a refactor too fast last night without testing thoroughly. I'll have this fixed today.