Skip to content

Casting root Catalog to Catalog type interferes with pystac-client Client class #410

@matthewhanson

Description

@matthewhanson

The pystac-client Client class inherits from Catalog. In the latest version some logic was updated so that when it is read from a file (pystac-client uses from_file to initially open a root API), it sees that it is a root catalog and casts itself to a Catalog.

See here:
https://github.com/stac-utils/pystac/blob/main/pystac/stac_object.py#L484

The .from_file is the most immediate issue. There is casting to Catalog in other cases, such as if you item.get_root() it casts it to a catalog, but this didn't work before anyway, because PySTAC resolves STAC object links with logic that doesn't know about pystac-client's Client class.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions