Encoding error when running Rasa X

Hey all,

I decided to migrate my routines and data to the new version of Rasa (2.1.3).

I trained NLU using my previous json dataset with success: rasa shell nlu works smoothly.

I trained rasa and calling my bot using rasa shell command works just fine.

Problem happens when I call rasa x, having the following output:

Starting Rasa X in local mode... 🚀
Traceback (most recent call last):
  File "c:\users\my_user\appdata\local\continuum\anaconda3\envs\rasa213\lib\site-packages\rasa\shared\utils\io.py", line 122, in read_file
    return f.read()
  File "c:\users\my_user\appdata\local\continuum\anaconda3\envs\rasa213\lib\codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 44: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\my_user\appdata\local\continuum\anaconda3\envs\rasa213\lib\site-packages\rasa\cli\x.py", line 472, in run_locally
    local.main(
  File "C:\Users\my_user\AppData\Roaming\Python\Python38\site-packages\rasax\community\local.py", line 224, in main
    _initialize_with_local_data(
  File "C:\Users\my_user\AppData\Roaming\Python\Python38\site-packages\rasax\community\local.py", line 160, in _initialize_with_local_data
    loop.run_until_complete(
  File "c:\users\my_user\appdata\local\continuum\anaconda3\envs\rasa213\lib\asyncio\base_events.py", line 616, in run_until_complete
    return future.result()
  File "C:\Users\my_user\AppData\Roaming\Python\Python38\site-packages\rasax\community\initialise.py", line 336, in inject_files_from_disk
    await inject_stories(
  File "C:\Users\my_user\AppData\Roaming\Python\Python38\site-packages\rasax\community\initialise.py", line 130, in inject_stories
    story_blocks = await story_service.save_stories_from_files(
  File "C:\Users\my_user\AppData\Roaming\Python\Python38\site-packages\rasax\community\services\story_service.py", line 545, in save_stories_from_files
    additional_blocks = await self.save_stories(
  File "C:\Users\my_user\AppData\Roaming\Python\Python38\site-packages\rasax\community\services\story_service.py", line 437, in save_stories
    processed_stories = await self._extract_stories_yaml(
  File "C:\Users\my_user\AppData\Roaming\Python\Python38\site-packages\rasax\community\services\story_service.py", line 365, in _extract_stories_yaml
    steps_list = self.get_story_steps(
  File "C:\Users\my_user\AppData\Roaming\Python\Python38\site-packages\rasax\community\services\story_service.py", line 212, in get_story_steps
    return StoryService._reader_read_from_string(reader, story_string)
  File "C:\Users\my_user\AppData\Roaming\Python\Python38\site-packages\rasax\community\services\story_service.py", line 133, in _reader_read_from_string
    return reader.read_from_file(temp_path)
  File "c:\users\my_user\appdata\local\continuum\anaconda3\envs\rasa213\lib\site-packages\rasa\shared\core\training_data\story_reader\yaml_story_reader.py", line 95, in read_from_file
    rasa.shared.utils.io.read_file(
  File "c:\users\my_user\appdata\local\continuum\anaconda3\envs\rasa213\lib\site-packages\rasa\shared\utils\io.py", line 128, in read_file
    raise FileIOException(
rasa.shared.exceptions.FileIOException: Failed to read file 'C:\Users\my_user\AppData\Local\Temp\tmpe3z8ap10', could not read the file using utf-8 to decode it. Please make sure the file is stored with this encoding.

Sorry, something went wrong (see error above). Make sure to start Rasa X with valid data and valid domain and config files. Please, also check any warnings that popped up.
If you need help fixing the issue visit our forum: http://forum.rasa.com/.

I wonder if this has something to do with some slot values on my stories after converting the file presenting special characters as ‘ç’, ‘á’ and etc… But Rasa X was working finely before the major upgrade.

Any hints on what can I do to fix this?

A thing worth mentioning: I am using Windows 10 for this.

same problem!

Same problem here :frowning:

I have the same problem(

Same problem: does anyone from Rasa have an idea?

same problem… it worked and now it’s causing these problem.

Rasa Version : 2.8.14

Minimum Compatible Version: 2.8.9

Rasa SDK Version : 2.8.3

Rasa X Version : 0.42.6

Python Version : 3.8.8

Operating System : Windows-10-10.0.18362-SP0

same problem