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

Encoding problem #4

Open
m0rff opened this issue Dec 7, 2017 · 0 comments
Open

Encoding problem #4

m0rff opened this issue Dec 7, 2017 · 0 comments

Comments

@m0rff
Copy link

m0rff commented Dec 7, 2017

rasa_nlu expects the request params to be utf-8
When I send a message with german umlauts (e.g. ä ü ö), the message is encoded with cp1252 instead of utf-8 and rasa_nlu fails to parse it.

2017-12-07 10:37:05+0100 [_GenericHTTPChannelProtocol,1,127.0.0.1] Unhandled Error
	Traceback (most recent call last):
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/klein/app.py", line 50, in _call
	    result = f(*args, **kwargs)
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/rasa_nlu/server.py", line 92, in decorated
	    return f(*args, **kwargs)
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/rasa_nlu/server.py", line 77, in decorated
	    return f(*args, **kwargs)
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 1532, in unwindGenerator
	    return _inlineCallbacks(None, gen, Deferred())
	--- <exception caught here> ---
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
	    result = g.send(result)
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/rasa_nlu/server.py", line 133, in parse_get
	    for key, value in request.args.items()}
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/rasa_nlu/server.py", line 133, in <dictcomp>
	    for key, value in request.args.items()}
	builtins.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 5: invalid start byte

2017-12-07 10:37:05+0100 [-] "127.0.0.1" - - [07/Dec/2017:09:37:04 +0000] "GET /parse?q=Das%20T\xfcrschloss%20an%20meiner%20Eingangst\xfcr%20ist%20defekt&project=default HTTP/1.1" 500 4214 "-" "axios/0.15.3"
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