Closed taivop closed 2 years ago
Hi @taivop yes this is specified as being for pathlib Path explicitly in the documentation - in the Vault class __init__
.
For example:
A Vault object lets you dig into your Obsidian vault, by giving
you a toolkit for analysing its contents. Specify a dirpath to
instantiate the class. This class is intended to support multiple
operating systems so pass a pathlib Path object.
Args:
dirpath (pathlib Path): the directory to analyse. This would
typically be the vault's directory. If you have a
subdirectory of the vault with notes you want to inspect,
then you could pass that.
@property
def dirpath(self):
"""pathlib Path"""
return self._dirpath
I can make this clearer in the readme and demo. For ease I will stick to just pathlib Path arg, it seems to be becoming the more modern preference.
When I initialize the vault with a string path, it fails:
gives
I would expect the initializer to either work with a string path, or explicitly declare the required type in the function as
pathlib.Path
, and emphasize that in the documentation.I'm on macOS, Python 3.9.1, obsidiantools 5c86662.