You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say you have a directory with data files in it that you want to document, but it's not the current working directory. You also don't have an ro-crate-metadata.json yet.
/path/to/crate/
some_file.txt
If you crate = ROCrate("/path/to/crate"), you will get ValueError: Not a valid RO-Crate: missing ro-crate-metadata.json.
This fails with FileNotFoundError: [Errno 2] No such file or directory: 'some_file.txt', because it uses self.source as the file path which isn't resolved relative to `crate.source.
I could write out the absolute path of each entity, but it's a bit verbose.
The text was updated successfully, but these errors were encountered:
ROCrate("/path/to/crate", init=True) means you don't want to read a crate at that path, but initialize one based on the directory tree rooted at that path (the tree is walked recursively, adding files as File and directories as Dataset)
Let's say you have a directory with data files in it that you want to document, but it's not the current working directory. You also don't have an
ro-crate-metadata.json
yet.If you
crate = ROCrate("/path/to/crate")
, you will getValueError: Not a valid RO-Crate: missing ro-crate-metadata.json
.If you use:
You get
FileNotFoundError: [Errno 2] No such file or directory: 'some_file.txt'
Even if you try to hack it:
This fails with
FileNotFoundError: [Errno 2] No such file or directory: 'some_file.txt'
, because it usesself.source
as the file path which isn't resolved relative to `crate.source.I could write out the absolute path of each entity, but it's a bit verbose.
The text was updated successfully, but these errors were encountered: