Fang-Yu Rao has posted comments on this change. (
http://gerrit.cloudera.org:8080/18256 )
Change subject: IMPALA-11133: Decode author of a commit with utf8 before
printing it
......................................................................
Patch Set 6:
Hi Quanlong and Laszlo, I just realized the issue is a bit more complicated
than expected.
Running "$IMPALA_HOME/bin/compare_branches.py --source_remote_name=""
--source_branch apache-ref-master --target_remote_name="" --target_branch
cdw-master-staging" on the command line is okay.
However, if we try to redirect the result to another file like
"$IMPALA_HOME/bin/compare_branches.py --source_remote_name="" --source_branch
apache-ref-master --target_remote_name="" --target_branch cdw-master-staging >
out.txt", we will see the following error.
Traceback (most recent call last):
File "/home/fangyurao/Impala_for_FE/bin/compare_branches.py", line 290, in
<module>
main()
File "/home/fangyurao/Impala_for_FE/bin/compare_branches.py", line 271, in
main
.format(commit_hash, msg.decode('utf8'), date, author.decode('utf8'))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position
156: ordinal not in range(128)
I have verified that appending ".encode()" to ".format()" could fix the
problem. I will thus push a follow-up patch.
--
To view, visit http://gerrit.cloudera.org:8080/18256
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieb03b0937a994db2bf08e4199574d04f7fb99f5d
Gerrit-Change-Number: 18256
Gerrit-PatchSet: 6
Gerrit-Owner: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Laszlo Gaal <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Wed, 23 Feb 2022 23:56:54 +0000
Gerrit-HasComments: No