Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于python SDK文档设置utf8 #15

Open
MelbPaulZ opened this issue Dec 13, 2021 · 0 comments
Open

关于python SDK文档设置utf8 #15

MelbPaulZ opened this issue Dec 13, 2021 · 0 comments

Comments

@MelbPaulZ
Copy link

文档中提到添加charset=utf-8,但是在实际的python sdk中并没有写参数可以添加在sdk的哪里,如果尝试添加到options栏里,运行时会在nlp文件_proccessRequest的时候报错,里面代码在判断

if sys.version_info.major == 2:
return json.dumps(data, ensure_ascii=False).decode('utf8').encode('gbk')
else:
return json.dumps(data, ensure_ascii=False).encode('gbk')

时,如果是python3就会直接执行最下面这行报错。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant