Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing launcher notebook #43

Open
emileten opened this issue Apr 4, 2024 · 0 comments
Open

Failing launcher notebook #43

emileten opened this issue Apr 4, 2024 · 0 comments
Assignees

Comments

@emileten
Copy link
Collaborator

emileten commented Apr 4, 2024

Hi @joemoorhouse,

Sorry for the multiple issues (somehow related to #37), but I am trying to get up to speed in this repo and for now I haven't been able to actually run things locally. I was hoping to use the launcher notebook, but I am running into various issues and have a few questions.

  1. Would it be possible to set up a quick call so that you walk me through how you set this up ?
  2. Can you check my set up below is correct?

Thank you !

Set up:

  • create a pdm environment with the repo dependencies per the contribution guideline (thanks for updating the environment management)
  • create a credentials.env file at the root of the repo with a personal account access credentials (that have general S3 access) and OSC_S3_BUCKET=physrisk-hazard-indicators. FYI The link to create creds in the physrisk repo README results in an error.
  • Tried to run the launcher notebook with the pdm environment.

Results in this error at this line :

target = OscZarr(prefix="hazard_test")  # test prefix is "hazard_test"; main one "hazard"
---------------------------------------------------------------------------
ClientError                               Traceback (most recent call last)
File [~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:720](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:720), in S3FileSystem._lsdir(self, path, refresh, max_items, delimiter, prefix, versions)
    [719](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:719) files = []
--> [720](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:720) async for c in self._iterdir(
    [721](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:721)     bucket,
    [722](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:722)     max_items=max_items,
    [723](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:723)     delimiter=delimiter,
    [724](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:724)     prefix=prefix,
    [725](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:725)     versions=versions,
    [726](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:726) ):
    [727](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:727)     if c["type"] == "directory":

File [~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:770](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:770), in S3FileSystem._iterdir(self, bucket, max_items, delimiter, prefix, versions)
    [763](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:763) it = pag.paginate(
    [764](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:764)     Bucket=bucket,
    [765](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:765)     Prefix=prefix,
   (...)
    [768](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:768)     **self.req_kw,
    [769](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:769) )
--> [770](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:770) async for i in it:
    [771](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/s3fs/core.py:771)     for l in i.get("CommonPrefixes", []):

File [~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/aiobotocore/paginate.py:30](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/aiobotocore/paginate.py:30), in AioPageIterator.__anext__(self)
     [29](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/aiobotocore/paginate.py:29) while True:
...
   [1453](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/zarr/storage.py:1453)     self.fs.invalidate_cache(self.fs._parent(path))
   [1454](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/zarr/storage.py:1454) except self.exceptions as e:
-> [1455](https://file+.vscode-resource.vscode-cdn.net/Users/emiletenezakis/devseed/os-climate-hazard/notebooks/~/devseed/os-climate-hazard/.venv/lib/python3.9/site-packages/zarr/storage.py:1455)     raise KeyError(key) from e

KeyError: '.zgroup'
@emileten emileten self-assigned this Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant