Skip to content

DagsHubFilesystem won't initialize withoug project_root #318

@idonov8

Description

@idonov8

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.

Metadata

Metadata

Assignees

Labels

UXbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions