You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The effect is that calling s3fs.walk with on_error specified passes that parameter through to _ls() which does not accept the parameter and raises an error.
Reproducible example
>>> from s3fs import S3FileSystem
>>> fs = S3FileSystem()
>>> [entry for entry in fs.walk('s3://my-bucket', on_error='omit')]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in <listcomp>
File "/Users/gshand/code/py-beta-common/.venv/lib/python3.8/site-packages/fsspec/spec.py", line 393, in walk
listing = self.ls(path, detail=True, **kwargs)
File "/Users/gshand/code/py-beta-common/.venv/lib/python3.8/site-packages/fsspec/asyn.py", line 113, in wrapper
return sync(self.loop, func, *args, **kwargs)
File "/Users/gshand/code/py-beta-common/.venv/lib/python3.8/site-packages/fsspec/asyn.py", line 80, in sync
coro = func(*args, **kwargs)
TypeError: _ls() got an unexpected keyword argument 'on_error'
The text was updated successfully, but these errors were encountered:
The s3fs API docs document the
walk
method as taking anon_error
parameter: https://s3fs.readthedocs.io/en/latest/api.html#s3fs.core.S3FileSystem.walk.This is in line with the general fsspec API https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.walk
However, it seems that the source for
walk
doesn't named the on_error parameter: https://github.com/fsspec/s3fs/blob/main/s3fs/core.py#L1972-L1976The effect is that calling s3fs.walk with
on_error
specified passes that parameter through to_ls()
which does not accept the parameter and raises an error.Reproducible example
The text was updated successfully, but these errors were encountered: