client
client copied to clipboard
DagsHubFilesystem won't initialize withoug `project_root`
I was trying to list files in my data directory, simple enough. I tried running:
fs = DagsHubFilesystem(repo_url=url)
fs.listdir("data")
and got the following error:
ValueError: Could not find a git repo. Either run the function inside of a git repo, specify project_root
with the path to a cloned DagsHub repository, or specify repo_url
(url of repo on DagsHub) and project_root
(path to the folder where to mount the filesystem) arguments
The solution was to add project_root="."
to DagsHubFilesystem()
, but it was hard to understand and required me to look in the code.
I propose it will be the default when using DagsHubFilesystem
with a repo_url
.