Skip to content

Support passing configuration options to default_object_store #559

@TomNicholas

Description

@TomNicholas

Encountered while working on #557

vz.open_virtual_dataset(
    's3://cworthy/oae-efficiency-atlas/data/experiments/000/01/alk-forcing.000-1999-01.pop.h.0347-01.nc',
    loadable_variables=[],
    decode_times=False,
    reader_options={'storage_options': {'anon': True, 'endpoint_url': 'https://data.source.coop/'}},
)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
File <timed exec>:1

File ~/Documents/Work/Code/VirtualiZarr/virtualizarr/backend.py:351, in open_virtual_mfdataset(paths, concat_dim, compat, preprocess, data_vars, coords, combine, parallel, join, attrs_file, combine_attrs, **kwargs)
    347 executor = get_executor(parallel=parallel)
    348 with executor() as exec:
    349     # wait for all the workers to finish, and send their resulting virtual datasets back to the client for concatenation there
    350     virtual_datasets = list(
--> 351         exec.map(
    352             open_func,
    353             paths1d,
    354         )
    355     )
    357 # TODO add file closers
    358 
    359 # Combine all datasets, closing them in case of a ValueError
    360 try:

File ~/Documents/Work/Code/VirtualiZarr/virtualizarr/parallel.py:310, in LithopsEagerFunctionExecutor.map(self, fn, timeout, chunksize, *iterables)
    307 fexec = lithops.FunctionExecutor()
    309 futures = fexec.map(fn, *iterables)
--> 310 results = fexec.get_result(futures)
    312 return results
...
File /usr/local/lib/python3.12/site-packages/virtualizarr/manifests/store.py:134, in _find_bucket_region()

File /usr/local/lib/python3.12/site-packages/requests/structures.py:52, in __getitem__()

KeyError: 'x-amz-bucket-region'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions