Encoding errors (edit)

I’m following the tutorial for creating a weatherbot and connecting it to a slack app. After completing the tutorial and kicking of the ‘run_app.py’ file i get the following error:

> Traceback (most recent call last):
>   File "C:\Anaconda3\lib\site-packages\gevent\threadpool.py", line 281, in _worker
>     value = func(*args, **kwargs)
> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 11: invalid continuation byte
> 2018-09-05T09:45:10Z (<ThreadPool at 0x1c7aa30de10 0/1/10 hub=<Hub at 0x1c7aa310e10 thread_ident=0x4012>>, <built-in function gethostbyaddr>) failed with UnicodeDecodeError
> 
> Traceback (most recent call last):
>   File "run_app.py", line 15, in <module>
>     agent.handle_channel(HttpInputChannel(5005, '/', input_channel))
>   File "C:\Anaconda3\lib\site-packages\rasa_core\agent.py", line 165, in handle_channel
>     processor.handle_channel(input_channel)
>   File "C:\Anaconda3\lib\site-packages\rasa_core\processor.py", line 72, in handle_channel
>     input_channel.start_sync_listening(self.handle_message)
>   File "C:\Anaconda3\lib\site-packages\rasa_core\channels\rest.py", line 36, in start_sync_listening
>     self._record_messages(message_handler)
>   File "C:\Anaconda3\lib\site-packages\rasa_core\channels\rest.py", line 59, in _record_messages
>     http_server.serve_forever()
>   File "C:\Anaconda3\lib\site-packages\gevent\baseserver.py", line 362, in serve_forever
>     self.start()
>   File "C:\Anaconda3\lib\site-packages\gevent\baseserver.py", line 306, in start
>     self.init_socket()
>   File "C:\Anaconda3\lib\site-packages\gevent\pywsgi.py", line 1475, in init_socket
>     self.update_environ()
>   File "C:\Anaconda3\lib\site-packages\gevent\pywsgi.py", line 1487, in update_environ
>     name = socket.getfqdn(address[0])
>   File "C:\Anaconda3\lib\site-packages\gevent\_socketcommon.py", line 253, in getfqdn
>     hostname, aliases, _ = gethostbyaddr(name)
>   File "C:\Anaconda3\lib\site-packages\gevent\_socketcommon.py", line 225, in gethostbyaddr
>     return get_hub().resolver.gethostbyaddr(ip_address)
>   File "C:\Anaconda3\lib\site-packages\gevent\resolver\thread.py", line 68, in gethostbyaddr
>     return self.pool.apply(_socket.gethostbyaddr, args, kwargs)
>   File "C:\Anaconda3\lib\site-packages\gevent\pool.py", line 159, in apply
>     return self.spawn(func, *args, **kwds).get()
>   File "src/gevent/event.py", line 381, in gevent._event.AsyncResult.get
>   File "src/gevent/event.py", line 409, in gevent._event.AsyncResult.get
>   File "src/gevent/event.py", line 399, in gevent._event.AsyncResult.get
>   File "src/gevent/event.py", line 379, in gevent._event.AsyncResult._raise_exception
>   File "C:\Anaconda3\lib\site-packages\gevent\_compat.py", line 47, in reraise
>     raise value.with_traceback(tb)
>   File "C:\Anaconda3\lib\site-packages\gevent\threadpool.py", line 281, in _worker
>     value = func(*args, **kwargs)
> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 11: invalid continuation byte

As my knowledge of python and bot building is still limited, i have not encountered this issue before and google is no help. Not sure if i’m in the right place, but any help would be appriciated.

Please note that the scripts are exactly like this tutorial, only with my own keys and name for the bot (and data etc).

EDIT: The same error appears when kicking off the run.py script. Again something wrong with: File “C:\Anaconda3\lib\site-packages\gevent\threadpool.py”, line 281, in _worker value = func(*args, **kwargs)

Any ideas?

You have a unicode error, seems like your request contains invalid characters… what language it is in?

Can you show the message you are trying to parse

actually i’m not parsing any message. I running the python script (english) as shown in the tutorial. Only thing i changed were the keys. I suspect something is wrong with them, but they are automatically generated by Slack.

Running the newest version of Rasa NLU + Core and also Python 3.7

I’m not sure if it is related, but it is recommended to use python 3.6

downgrading did not solve the issue, but thanks for the heads up about the recommended version :slight_smile:

This issue has been resolved and the post can be closed (if that is possible). 0xe9 stands for é, which was used in my sqlserver name (to connect my bot to). This was not an issue before 0.11, but after updating it was.