Rasa X editing my domain file

When rasa X is run on my colleague machine, it gives an error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 in position 318: invalid continuation byte

I discovered that it does that because of an error on my domain file, and then I found out that running the command rasa x changes my domain file and it doesnt work in this changed state, not even other commands such as rasa train.

However, the same file runs perfectly on another machine (both machines are Windows) and the rasa x command doesn´t break the domain file.

Does anyone know what is happening?

Here is the working version of the domain file:

%YAML 1.1

actions:

  • action_joke
  • utter_affirm_response
  • utter_age
  • utter_denial_confirm
  • utter_explain_business
  • utter_goodbye
  • utter_greet
  • utter_introduction
  • utter_name
  • utter_respond_to_question
  • utter_send_resume
  • utter_thanks
  • utter_welcome_message entities:
  • name intents:
  • goodbye
  • work_with_us
  • affirm
  • bot_age
  • deny
  • greet
  • introduction
  • joke
  • name
  • question
  • question_about_business
  • thanks slots: name: type: text templates: utter_affirm_response:
    • text: Ok, sem problema. utter_age:
    • text: Ainda estou em construção, então minha idade é de 0 anos. utter_default:
    • text: Desculpe, eu não entendi. Você poderia repetir a pergunta, por favor?
    • text: Não entendi bem o que você disse. Você pode repetir a pergunta, por favor? utter_denial_confirm:
    • text: Entendi. Então, no que posso te ajudar? utter_explain_business:
    • text: O business Group opera nos segmentos de tecnologia da informação/telecomunicações, controle de produção e empreendimentos imobiliários. utter_goodbye:
    • text: Até mais ver! utter_greet:
    • text: Muito prazer {name}. Como posso ajudar? utter_introduction:
    • text: Sou um robô criado para testar o Rasa. utter_name:
    • text: Olá! Me diga o seu nome, por favor. utter_respond_to_question:
    • text: Pode perguntar utter_send_resume:
    • text: Legal, entendi que você quer trabalhar conosco! Envie seu currículo para o e-mail contato@bussiness.com.br e te retornaremos assim que possível. Boa sorte! utter_thanks:
    • text: De nada. Estou aqui se precisar. utter_welcome_message:
    • text: Olá, em que posso te ajudar?

And here is the broken version:

intents:
  • goodbye
  • work_with_us
  • affirm
  • bot_age
  • deny
  • greet
  • introduction
  • joke
  • name
  • question
  • question_about_business
  • thanks entities:
  • name slots: name: type: text templates: utter_affirm_response:
    • text: Ok, sem problema. utter_age:
    • text: Ainda estou em constru褯, ent䯠minha idade 顤e 0 anos. utter_default:
    • text: Desculpe, eu n䯠entendi. Vocꡰoderia repetir a pergunta, por favor?
    • text: N䯠entendi bem o que vocꡤisse. Vocꡰode repetir a pergunta, por favor? utter_denial_confirm:
    • text: Entendi. Ent䯬 no que posso te ajudar? utter_explain_business:
    • text: O business Group opera nos segmentos de tecnologia da informa褯/telecomunica趥s, controle de produ褯 e empreendimentos imobili⳩os. utter_goodbye:
    • text: At顭ais ver! utter_greet:
    • text: Muito prazer {name}. Como posso ajudar? utter_introduction:
    • text: Sou um rob��iado para testar o Rasa. utter_name:
    • text: OlᡠMe diga o seu nome, por favor. utter_respond_to_question:
    • text: Pode perguntar utter_send_resume:
    • text: Legal, entendi que vocꡱuer trabalhar conosco! Envie seu currlo para o e-mail contato@business.com.br e te retornaremos assim que possl. Boa sorte! utter_thanks:
    • text: De nada. Estou aqui se precisar. utter_welcome_message:
    • text: Olᬠem que posso te ajudar? actions:
  • action_joke
  • utter_affirm_response
  • utter_age
  • utter_denial_confirm
  • utter_explain_business
  • utter_goodbye
  • utter_greet
  • utter_introduction
  • utter_name
  • utter_respond_to_question
  • utter_send_resume
  • utter_thanks
  • utter_welcome_message

Hi @CaioTsubake. Do you have your domain formatted the same way as it is posted here?

Hi @Juste.

I didn’t noticed the weird characters when I pasted the text file, but yes I copied the contents of the file directly inside the question box, although on the machine, it doesn’t show the japanese ideograms and other stuff like that.
The first one from the file in the working state, that I have saved on my Git repository, like this it can train and run normaly, and the second one after I tried to run the “rasa X” command.

The bot we are build is for portuguese language so that is the reason that the text from the utter actions is in portuguese. I noticed that all the characters that appear broken are characters that have special signs in them, like é, ê, ã and others like that.

Great. Yeah, I think this is where the issue hides. Can you double check that your domain file is encoded as utf-8?

I just checked and the file is in UTF-8, but we noticed that after running rasa X, the file was converted to ANSI, something that we didn’t noticed before.

1 Like

I had a similar issue with german letters. Try updating to the new version, Version 0.21.4 fixed it for me.

See also here