Skip to content

Commit

Permalink
Wrapper.download_full_annotation_archiveの不具合を修正 (#442)
Browse files Browse the repository at this point in the history
* update

* version up
  • Loading branch information
yuji38kwmt committed Apr 6, 2022
1 parent 287f57d commit d7407bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion annofabapi/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.55.2"
__version__ = "0.55.3"
5 changes: 3 additions & 2 deletions annofabapi/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,9 @@ def download_full_annotation_archive(self, project_id: str, dest_path: Union[str
FutureWarning,
stacklevel=2,
)
content, _ = self.api.get_archive_full_with_pro_id(project_id)
url = content["url"]
# 2022/01時点でレスポンスのcontent-typeが"text/plain"なので、contentの型がdictにならない。したがって、Locationヘッダを参照する。
_, response = self.api.get_archive_full_with_pro_id(project_id)
url = response.headers["Location"]
response2 = self._download(url, dest_path)
logger.info(
"FullアノテーションZIPファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', file='%s'",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "annofabapi"
version = "0.55.2"
version = "0.55.3"
description = "Python Clinet Library of AnnoFab WebAPI (https://annofab.com/docs/api/)"
authors = ["yuji38kwmt"]
license = "MIT"
Expand Down

0 comments on commit d7407bc

Please sign in to comment.