Skip to content

fs.ls("/") raises error after fs.rm("/", recursive=True) for memory filesystem #925

Closed
@benlindsay

Description

@benlindsay

To replicate this error, run this:

import fsspec

fs = fsspec.filesystem("memory")
fs.rm("/", recursive=True)
fs.ls("/")

Which results in the following traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/.../site-packages/fsspec/implementations/memory.py", line 91, in ls
    raise FileNotFoundError(path)
FileNotFoundError

I would expect it to return an empty list as it does before the ls.rm() call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions