Can't run rasa x - Could not read file using the utf-8 coding

I’m using rasa version 2.0.2, rasa-sdk 2.0.0, rasa-x 0.33, but when I try to run

rasa x

, this error appears:

f"Failed to read file ‘{os.path.abspath(filename)}’, " rasa.shared.exceptions.FileIOException: Failed to read file ‘C:\Users\Me\AppData\Local\Temp\tmpwatubvyl’, 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.

I’ve checked my data and config quite a lot, but haven’t found any errors, data validate doesn’t show anything major I believe, and the file that’s mentioned in the error (AppData\Local\Temp\tmpwatubvyl) doesn’t exist. Anyone have any ideas of what I should do? Thanks…

Hi Jessica,

Is this a python/pip based install?

Can you paste the output of your rasa data validate?

hy! I am having a similar situation, it happens when I try to train the model. I just modified the nlu.yml file created with rasa init. The output of rasa data validate is: FileIOException: Failed to read file ‘/Ejemplo_FAQs/data/._nlu.md’, could not read the file using utf-8 to decode it. Please make sure the file is stored with this encoding.

Is this the actual name of your nlu file: /Ejemplo_FAQs/data/._nlu.md

Are there any special characters in this file?

It is a python based install. And yes, rasa shell and training does work normally. This is my output for the data validate:

c:\users\Me\anaconda3\lib\importlib\_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
  return f(*args, **kwds)
c:\users\Me\anaconda3\lib\importlib\_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
  return f(*args, **kwds)
c:\users\Me\anaconda3\lib\importlib\_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
  return f(*args, **kwds)
c:\users\Me\anaconda3\lib\importlib\_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
  return f(*args, **kwds)
2020-11-06 22:53:32 INFO     rasa.validator  - Validating intents...
2020-11-06 22:53:32 INFO     rasa.validator  - Validating uniqueness of intents and stories...
2020-11-06 22:53:32 INFO     rasa.validator  - Validating utterances...
2020-11-06 22:53:32 INFO     rasa.validator  - Story structure validation...
Processed story blocks: 100%|██████████████████████████████████████████| 20/20 [00:00<00:00, 2227.75it/s, # trackers=1]
Processed rules: 100%|███████████████████████████████████████████████████| 2/2 [00:00<00:00, 1003.54it/s, # trackers=1]
2020-11-06 22:53:32 INFO     rasa.core.training.story_conflict  - Considering the preceding 6 turns for conflict analysis.
2020-11-06 22:53:32 INFO     rasa.validator  - No story structure conflicts found.

Thx for your replay, I just had to change the extension from .md to .yml regards

Name Version
rasa 2.0.2
rasa-sdk 2.0.0
rasa-x 0.33.2

I am getting the same error even though I have been using all yaml files.

rasa.shared.exceptions.FileIOException: Failed to read file could not read the file using utf-8 to decode it. Please make sure the file is stored with this encoding.

The output of “rasa data validate” command is:

2020-11-17 20:22:48 INFO rasa.validator - Validating intents… c:\users\test\anaconda3\envs\py38\lib\site-packages\rasa\shared\utils\io.py:93: UserWarning: There is a message in the training data labeled with intent ‘:mood_great’. This intent is not listed in your domain. You should need to add that intent to your domain file! More info at Domain 2020-11-17 20:22:48 INFO rasa.validator - Validating uniqueness of intents and stories… 2020-11-17 20:22:48 INFO rasa.validator - Validating utterances… Project validation completed with errors.

Although I already have the intent mood_great listed in my domain.yml file.

Could anyone from RASA team please help us out here.

2 Likes

Me to i have the same problem. I don’t know why

Traceback (most recent call last): File “c:\users\papa.seye\rasatest\lib\site-packages\rasa\cli\x.py”, line 494, in run_locally local.main( File “c:\users\papa.seye\rasatest\lib\site-packages\rasax\community\local.py”, line 241, in main _initialize_with_local_data( File “c:\users\papa.seye\rasatest\lib\site-packages\rasax\community\local.py”, line 163, in _initialize_with_local_data loop.run_until_complete( File “C:\Users\papa.seye\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py”, line 608, in run_until_complete return future.result() File “c:\users\papa.seye\rasatest\lib\site-packages\rasax\community\initialise.py”, line 369, in inject_files_from_disk await inject_stories( File “c:\users\papa.seye\rasatest\lib\site-packages\rasax\community\initialise.py”, line 134, in inject_stories story_blocks = await story_service.save_stories_from_files( File “c:\users\papa.seye\rasatest\lib\site-packages\rasax\community\services\story_service.py”, line 545, in save_stories_from_files additional_blocks = await self.save_stories( File “c:\users\papa.seye\rasatest\lib\site-packages\rasax\community\services\story_service.py”, line 437, in save_stories processed_stories = await self._extract_stories_yaml( File “c:\users\papa.seye\rasatest\lib\site-packages\rasax\community\services\story_service.py”, line 365, in _extract_stories_yaml steps_list = self.get_story_steps( File “c:\users\papa.seye\rasatest\lib\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\papa.seye\rasatest\lib\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\papa.seye\rasatest\lib\site-packages\rasa\shared\core\training_data\story_reader\yaml_story_reader.py”, line 98, in read_from_file rasa.shared.utils.io.read_file( File “c:\users\papa.seye\rasatest\lib\site-packages\rasa\shared\utils\io.py”, line 131, in read_file raise FileIOException( rasa.shared.exceptions.FileIOException: Failed to read file ‘C:\Users\PAPA~1.SEY\AppData\Local\Temp\tmpulrd9tcl’, 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 had a similar issue, my file was ._nlu.yml Deleting the file solved my problem

  • I wonder if your problem has been solved