From ebfcafe57e49b24c3cb7309063d5c9b5ebc90a8b Mon Sep 17 00:00:00 2001 From: David Manthey Date: Wed, 9 Nov 2022 22:15:40 -0500 Subject: [PATCH] Use open.read rather than download to access files in Girder. download returns a forward on S3 assetstores. --- CHANGELOG.md | 5 +++++ girder_annotation/girder_large_image_annotation/handlers.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 283d14c8f..dc4860bea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 1.17.4 + +### Bug Fixes +- Use open.read rather than download to access files in Girder ([#989](../../pull/989)) + ## 1.17.3 ### Changes diff --git a/girder_annotation/girder_large_image_annotation/handlers.py b/girder_annotation/girder_large_image_annotation/handlers.py index a53f34aed..45e244a9e 100644 --- a/girder_annotation/girder_large_image_annotation/handlers.py +++ b/girder_annotation/girder_large_image_annotation/handlers.py @@ -124,7 +124,7 @@ def process_annotations(event): # noqa: C901 logger.error('Could not load models from the database') return try: - data = orjson.loads(b''.join(File().download(file)()).decode()) + data = orjson.loads(File().open(file).read().decode()) except Exception: logger.error('Could not parse annotation file') raise