Skip to content

Can't write a STAC Parquet file from a list of Items #462

Closed as not planned
@alexgleith

Description

@alexgleith

Code is here:

import stacrs
from ldn.utils import get_s3_keys
from concurrent.futures import ThreadPoolExecutor

from pystac import Item

keys = get_s3_keys()

def fetch_item(key):
    return Item.from_file(f"https://{key}")

with ThreadPoolExecutor(max_workers=10) as executor:
    items = list(executor.map(fetch_item, keys))

print(f"Found {len(items)} items")

stacrs.write("items.parquet", items)

It fails with the error:

TypeError: unsupported type Item.

But type(items[0]) results in:

pystac.item.Item

Metadata

Metadata

Assignees

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