diff --git a/archivebox/core/views.py b/archivebox/core/views.py index c52903f0..14b57036 100644 --- a/archivebox/core/views.py +++ b/archivebox/core/views.py @@ -211,16 +211,22 @@ class SnapshotView(View): status=404, ) except Http404: + assert snapshot # (Snapshot.DoesNotExist is already handled above) + # Snapshot dir exists but file within does not e.g. 124235.324234/screenshot.png return HttpResponse( format_html( ( '



' - f'Snapshot [{snapshot.timestamp}] exists in DB, but resource {snapshot.timestamp}/' + f'Snapshot [{snapshot.timestamp}]: {snapshot.url}
' + f'was queued on {str(snapshot.added).split(".")[0]}, ' + f'but no files have been saved yet in:
{snapshot.timestamp}/' '{}' - f' does not exist in the snapshot dir yet.

' - 'It\'s possible that this resource type is not available for the Snapshot,
or that the archiving process has not completed yet.
' - f'
# if interrupted, run this cmd to finish archiving this Snapshot
archivebox update -t timestamp {snapshot.timestamp}


' + f'


' + 'It\'s possible {} ' + f'during the last capture on {str(snapshot.added).split(".")[0]},
or that the archiving process has not completed yet.
' + f'
# run this cmd to finish/retry archiving this Snapshot
' + f'archivebox update -t timestamp {snapshot.timestamp}


' '
' 'Next steps:
' f'- list all the Snapshot files .*
' @@ -230,7 +236,8 @@ class SnapshotView(View): '- or return to the main index...
' '
' ), - archivefile, + archivefile if str(archivefile) != 'None' else '', + f'the {archivefile} resource could not be fetched' if str(archivefile) != 'None' else 'the original site was not available', ), content_type="text/html", status=404,