-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude known non-FS kwargs in url_to_fs (#1316)
- Loading branch information
1 parent
e64f0a1
commit 285094f
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
285094f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I think that this commit is somehow involved in an error we're seeing at ome/ome-zarr-py#304
At least when I comment out the code in this commit, then the error goes away (using test code based on that issue).
We're passing in
auto_mkdir = True
when we create theFSStore()
athttps://github.com/ome/ome-zarr-py/blob/30f55fccb2528b69482139a1a7592c9d0ed5e2da/ome_zarr/format.py#L196
but that is stripped out here so it never reaches the
LocalFileSystem() init
atfilesystem_spec/fsspec/implementations/local.py
Line 35 in 4eeba2b
Any idea what's going on, or if we need to do something different?
Thanks
285094f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@will-moore : the purpose of url_to_fs is to make filesystem instances with the same input as open/open_files, but without actually writing or reading any files. The trouble is, open_files takes auto_mkdir and creates directories for the specific locations it expects to write to, and so separately does localFS.
It is possible that using auto_mkdirs in open_files is a mistake. Certainly, no tests rely on it except fsspec/tests/test_core.py::test_automkdir (which tests this very thing). However, we would like to remove it gracefully if so.
Another possibility is to have url_to_fs call open_files directly.
For a workaround, you can set auto_mkdir=True in the fsspec config for the localFS alone.
285094f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
285094f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @martindurant - Thanks for your response...
I'm wondering if we are doing something wrong in
ome-zarr-py
, but to simplify my test case a bit I've tried to distill the commands we're using.This is essentially what we're doing:
The
auto_mkdir
option worked previously in this usage.I'm sure there's a better way to achieve the same thing, but we currently use the store in other places so we create it manually like that.
As I understand it, the config workaround would need creation of a json file at
~/.config/fsspec/conf.json
for all users? I think this would be kinda painful for all users ofome-zarr-py
.cc @joshmoore
285094f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1358