Open pvavra opened 3 years ago
I think that hirni-spec4anything should also work on arbitrary files in the dataset-root, even though the use-cases might be few..
I agree!
In fact you can do this, but it's not obvious how: The error does not come from the given path, but from the default behavior for figuring the specification file to write to. This should be fixed - absolutely agree, but you can have what you want by circumventing the determination of the target file by specifying it:
datalad hirni-spec4anything --spec-file studyspec.json somefile
does what you want.
In a new and empty dataset, the following does not work:
The error message indicates that hirni is interpreting
somefile
as the acquisition folder:[ERROR ] [Errno 20] Not a directory: '/home/.../bug_demo/somefile/studyspec.json' [json_py.py:dum2stream:121] (NotADirectoryError)
(NB: I removed the full path info)
However, moving the file into a subdir and rerunning works.
I think that
hirni-spec4anything
should also work on arbitrary files in the dataset-root, even though the use-cases might be few.. I came across this during testing of my behavior-logfile converter, which I do in a separate dataset without the dicom-acquisitions.