tomodachi94/obsidian-metadata-handler

Check on adding `created_date` fails when checking for `modified_date`

tomodachi94 opened this issue · 2 comments

User lifesign on the Forums reported an error.

Traceback

$ python3 obsidian-metadata-handler/created.py -p "./test-vault"
test-vault/A file.md
Traceback (most recent call last):
  File "/Users/gaofeng/Code/opensource/obsidian-metadata-handler/obsidian-metadata-handler/created.py", line 30, in <module>
    if file["modified_date"] == True:
  File "/usr/local/lib/python3.9/site-packages/frontmatter/__init__.py", line 275, in __getitem__
    return self.metadata[name]
KeyError: 'modified_date'

(cc @lifesign, I think you are the same person…)

I was able to reproduce the error, with the same result. I'll start working on a patch.

Closing this issue, as script has been deprecated and stability isn't guaranteed. Please see #9.