#4332 【sdk】windows命令行执行调用sdk的python代码输出重定向到文件会报UnicodeEncodeError

Closed
created 10 months ago by wangj · 1 comments
wangj commented 10 months ago
新建1.py文件,写一段python代码调用sdk来上传文件。在windows命令行执行 python 1.py > 1.log ,会报错 File "c:\program files\python\python37\lib\site-packages\openi\dataset\dataset.py", line 247, in uploadMain print(self.stdOut(f'🎉 Successfully uploaded, view on link: {url}')) UnicodeEncodeError: 'gbk' codec can't encode character '\U0001f389' in position 19: illegal multibyte sequence linux机器上没有这个现象。 windows命令行窗口 执行 python 1.py,也不会报错。
wangj added this to the V20230531 milestone 10 months ago
wangj added the
bug
label 10 months ago
chenzh was assigned by wangj 10 months ago
wangj added the
wontfix
label 10 months ago
wangj commented 10 months ago
Owner
有时候windows命令行窗口不能正确显示UTF-8编码字符。
wangj closed this issue 10 months ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.