Skip to content

Commit

Permalink
[instruction download] Windows環境で実行するとUnicodeEncodeErrorが発生する問題の対応 (#910
Browse files Browse the repository at this point in the history
)

* encodingを指定

* version up

* format
  • Loading branch information
yuji38kwmt authored Dec 4, 2022
1 parent 02954ff commit e97d3b7
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 149 deletions.
2 changes: 1 addition & 1 deletion annofabcli/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.74.0"
__version__ = "1.74.1"
8 changes: 3 additions & 5 deletions annofabcli/instruction/download_instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import annofabapi
import pyquery
from annofabapi.models import ProjectMemberRole

import annofabcli
from annofabcli.common.cli import (
Expand Down Expand Up @@ -113,7 +112,7 @@ def download_instruction(
)

output_html = output_dir / "index.html"
output_html.write_text(str_instruction_html)
output_html.write_text(str_instruction_html, encoding="utf-8")
logger.debug(f"{output_html} をダウンロードしました。")


Expand All @@ -133,7 +132,7 @@ def main(self):
args = self.args

project_id = args.project_id
super().validate_project(project_id, project_member_roles=[ProjectMemberRole.OWNER])
super().validate_project(project_id)

if args.before is not None:
history_id = self.get_history_id_from_before_index(args.project_id, args.before)
Expand Down Expand Up @@ -199,7 +198,6 @@ def add_parser(subparsers: Optional[argparse._SubParsersAction] = None):
subcommand_name = "download"
subcommand_help = "作業ガイドをダウンロードします。"
description = "作業ガイドをダウンロードします。HTMLファイルにはbodyタグの内部が記載されています。"
epilog = "オーナロールを持つユーザで実行してください。"
parser = annofabcli.common.cli.add_parser(subparsers, subcommand_name, subcommand_help, description, epilog=epilog)
parser = annofabcli.common.cli.add_parser(subparsers, subcommand_name, subcommand_help, description)
parse_args(parser)
return parser
Loading

0 comments on commit e97d3b7

Please sign in to comment.