Skip to content

Traceback on journal['last_comment_meta'] in backup.py #10

Description

@zetasyanthis

This is from the 0.2 release. Looks like the journal['last_comment_meta'] field occasionally comes back None, which blows up backup.py.

Traceback (most recent call last):
  File "./src/myarchive/main.py", line 156, in <module>
    main()
  File "./src/myarchive/main.py", line 146, in main
    ljapi.download_journals_and_comments()
  File "/mnt/bulk/repos/projects/myarchive/src/myarchive/ljlib.py", line 39, in download_journals_and_comments
    nc = update_journal_comments(server=self._server, journal=self.journal)
  File "/usr/local/lib/python2.7/dist-packages/lj/backup.py", line 148, in update_journal_comments
    if len(journal['comments']) == 0 or days_ago(journal['last_comment_meta']) > 30:
  File "/usr/local/lib/python2.7/dist-packages/lj/backup.py", line 61, in days_ago
    return (datetime.datetime.today() - datetime_from_string(s)).days
  File "/usr/local/lib/python2.7/dist-packages/lj/backup.py", line 57, in datetime_from_string
    return datetime.datetime.strptime(s, "%Y-%m-%d %H:%M:%S")
TypeError: must be string, not None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions