Skip to content

get_fs_token_paths swallows url with cached protocol #1727

@groutr

Description

@groutr

blockcache and cached refer to the same class in the registry, however I observe the following.

url = 'https://nomads.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/nwm.20241016/forcing_analysis_assim/nwm.t00z.analysis_assim.forcing.tm00.conus.nc'
z1 = fsspec.open(f"blockcache::{url}")
# <OpenFile 'https://nomads.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/nwm.20241016/forcing_analysis_assim/nwm.t00z.analysis_assim.forcing.tm00.conus.nc'>
z2 = fsspec.open(f"cached::{url}")
# <OpenFile ''>

It appears the path goes missing when open calls get_fs_token_paths

fsspec.core.get_fs_token_paths(f"blockcache::{url}")   # returns correct path
fsspec.core.get_fs_token_paths(f"cached::{url}")   # returns empty string for path

Should the behavior be consistent here?

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