Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DagsHubFilesystem won't initialize withoug project_root #318

Open
idonov8 opened this issue Jul 6, 2023 · 0 comments
Open

DagsHubFilesystem won't initialize withoug project_root #318

idonov8 opened this issue Jul 6, 2023 · 0 comments
Assignees
Labels
bug Something isn't working UX

Comments

@idonov8
Copy link
Contributor

idonov8 commented Jul 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant