Skip to content

HTTPFileSystem breaks when range requests are not supported #1626

Open
@dholth

Description

@dholth
from fsspec.core import url_to_fs

ufs, url = url_to_fs("https://example.org/")
f = ufs.open("https://example.org/no-range-requests/data.txt")
f.seek(8192)
f.read(1)

Will raise # ValueError: The HTTP server doesn't appear to support range requests.

I was having trouble with cache options, but it turns out I was sending simplecache:: to the wrong place; this does work, but I don't really want to keep the seekable file around after the file is closed. Trying to be careful to open the file only once.

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