You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 4, 2022. It is now read-only.
Hello,
I'm getting encoding error:
i use Language KOREAN and test JAPANESE language too.
i try -e PYTHONIOENCODING=utf-8 and euc-kr , but can't work it.
can you fix it?
192.168.0.200 - - [28/May/2019 15:35:07] "GET /command?message=turn%20off%20light HTTP/1.1" 200 -,
[2019-05-28 15:35:18,202] ERROR in app: Exception on /command [GET],
Traceback (most recent call last):,
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1832, in full_dispatch_request,
rv = self.dispatch_request(),
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1818, in dispatch_request,
return self.view_functionsrule.endpoint,
File "/usr/local/lib/python3.5/dist-packages/flask_restful/init.py", line 458, in wrapper,
resp = resource(*args, **kwargs),
File "/usr/local/lib/python3.5/dist-packages/flask/views.py", line 88, in view,
return self.dispatch_request(*args, **kwargs),
File "/usr/local/lib/python3.5/dist-packages/flask_restful/init.py", line 573, in dispatch_request,
resp = meth(*args, **kwargs),
File "/gawebserver.py", line 169, in get,
assistant.send_text_query(message),
File "/usr/local/lib/python3.5/dist-packages/google/assistant/library/assistant.py", line 215, in send_text_query,
self._lib.assistant_send_text_query(self._inst, query.encode('ASCII')),
UnicodeEncodeError: 'ascii' codec can't encode character '\ubd88' in position 0: ordinal not in range(128),
192.168.0.200 - - [28/May/2019 15:35:18] "GET /command?message=불%20꺼 HTTP/1.1" 500 -,
The text was updated successfully, but these errors were encountered:
On line 215 of the assistant.py file
self._lib.assistant_send_text_query (self._inst, query.encode ('ASCII')) to
self._lib.assistant_send_text_query (self._inst, query.encode ('UTF-8'))
change 'ASCII' to 'UTF-8',
you can make Korean commands without any problem.
On line 215 of the assistant.py file
self._lib.assistant_send_text_query (self._inst, query.encode ('ASCII')) to
self._lib.assistant_send_text_query (self._inst, query.encode ('UTF-8'))
change 'ASCII' to 'UTF-8',
you can make Korean commands without any problem.
You might need to install nano beforehand. You can do that via: sudo docker container exec -it gawebserver apt-get update & sudo docker container exec -it gawebserver apt-get install nano
Not sure if this survives redeployment... but a docker restart seems fine for this :)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I'm getting encoding error:
i use Language KOREAN and test JAPANESE language too.
i try -e PYTHONIOENCODING=utf-8 and euc-kr , but can't work it.
can you fix it?
192.168.0.200 - - [28/May/2019 15:35:07] "GET /command?message=turn%20off%20light HTTP/1.1" 200 -,
[2019-05-28 15:35:18,202] ERROR in app: Exception on /command [GET],
Traceback (most recent call last):,
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1832, in full_dispatch_request,
rv = self.dispatch_request(),
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1818, in dispatch_request,
return self.view_functionsrule.endpoint,
File "/usr/local/lib/python3.5/dist-packages/flask_restful/init.py", line 458, in wrapper,
resp = resource(*args, **kwargs),
File "/usr/local/lib/python3.5/dist-packages/flask/views.py", line 88, in view,
return self.dispatch_request(*args, **kwargs),
File "/usr/local/lib/python3.5/dist-packages/flask_restful/init.py", line 573, in dispatch_request,
resp = meth(*args, **kwargs),
File "/gawebserver.py", line 169, in get,
assistant.send_text_query(message),
File "/usr/local/lib/python3.5/dist-packages/google/assistant/library/assistant.py", line 215, in send_text_query,
self._lib.assistant_send_text_query(self._inst, query.encode('ASCII')),
UnicodeEncodeError: 'ascii' codec can't encode character '\ubd88' in position 0: ordinal not in range(128),
192.168.0.200 - - [28/May/2019 15:35:18] "GET /command?message=불%20꺼 HTTP/1.1" 500 -,
The text was updated successfully, but these errors were encountered: