Skip to content

Commit d7407bc

Browse files
authored
Wrapper.download_full_annotation_archiveの不具合を修正 (#442)
* update * version up
1 parent 287f57d commit d7407bc

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

annofabapi/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.55.2"
1+
__version__ = "0.55.3"

annofabapi/wrapper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,9 @@ def download_full_annotation_archive(self, project_id: str, dest_path: Union[str
271271
FutureWarning,
272272
stacklevel=2,
273273
)
274-
content, _ = self.api.get_archive_full_with_pro_id(project_id)
275-
url = content["url"]
274+
# 2022/01時点でレスポンスのcontent-typeが"text/plain"なので、contentの型がdictにならない。したがって、Locationヘッダを参照する。
275+
_, response = self.api.get_archive_full_with_pro_id(project_id)
276+
url = response.headers["Location"]
276277
response2 = self._download(url, dest_path)
277278
logger.info(
278279
"FullアノテーションZIPファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', file='%s'",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "annofabapi"
3-
version = "0.55.2"
3+
version = "0.55.3"
44
description = "Python Clinet Library of AnnoFab WebAPI (https://annofab.com/docs/api/)"
55
authors = ["yuji38kwmt"]
66
license = "MIT"

0 commit comments

Comments
 (0)