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.
I was trying to list files in my data directory, simple enough.
I tried running:
and got the following error:
ValueError: Could not find a git repo. Either run the function inside of a git repo, specify
project_rootwith the path to a cloned DagsHub repository, or specifyrepo_url(url of repo on DagsHub) andproject_root(path to the folder where to mount the filesystem) argumentsThe solution was to add
project_root="."toDagsHubFilesystem(), but it was hard to understand and required me to look in the code.I propose it will be the default when using
DagsHubFilesystemwith arepo_url.