-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
I wasn't able to use the S3Store, always got NoSuchKeyExceptions. So I took the code of your test method https://github.com/zarr-developers/zarr-java/blob/main/src/test/java/dev/zarr/zarrjava/ZarrStoreTest.java#L59 put it into main method and ran it, got the same issue:
public static void main(String[] args) throws ZarrException, IOException {
S3Store s3Store = new S3Store(S3Client.builder()
.region(Region.of("eu-west-1"))
.credentialsProvider(AnonymousCredentialsProvider.create())
.build(), "static.webknossos.org", "data");
Array array = Array.open(s3Store.resolve("zarr_v3", "l4_sample", "color", "1"));
System.out.println(array.metadata().shape);
}
=>
Exception in thread "main" software.amazon.awssdk.services.s3.model.NoSuchKeyException: (Service: S3, Status Code: 404, Request ID: XFXFSFXGJW239G5Z, Extended Request ID: Rb1dohY0bRM5Y1oMSkkOO1W2J91Hi+emcyUD3YjfJC3EJQSL9NCmcmLHnafvEVKuEEvlsbZUYD8=) (SDK Attempt Count: 1) (Service: S3, Status Code: 404, Request ID: XFXFSFXGJW239G5Z, Extended Request ID: Rb1dohY0bRM5Y1oMSkkOO1W2J91Hi+emcyUD3YjfJC3EJQSL9NCmcmLHnafvEVKuEEvlsbZUYD8=)
at software.amazon.awssdk.services.s3.model.NoSuchKeyException$BuilderImpl.build(NoSuchKeyException.java:150)
...
at software.amazon.awssdk.services.s3.DefaultS3Client.headObject(DefaultS3Client.java:7623)
at dev.zarr.zarrjava.store.S3Store.exists(S3Store.java:60)
at dev.zarr.zarrjava.store.StoreHandle.exists(StoreHandle.java:56)
at dev.zarr.zarrjava.core.Array.open(Array.java:39)
at dev.zarr.zarrjava.Test.main(Test.java:17)
What am I missing? Because when I run the tests, all tests are passing!
Metadata
Metadata
Assignees
Labels
No labels