Ecoding and Decoding error in interactive learning

I’m trying to do interactive learning in chinese and I faced the error stated as below in my file.

UnicodeDecodeError: ‘charmap’ codec can’t decode byte 0x8d in position 452: character maps to

The file is as shown below. May every one help me solve the problem?

> ## happy path 1
> *greet
>     - utter_greet
> *application
>     - utter_application
> *inform{'forms': "公用地方維修資助"}
>     - action_application
> *allowance
>     - utter_allowance
> *inform{'forms': "公用地方維修資助"}
>     - action_allowance
> *goodbye
>    - utter_goodbye

Hey @cctong-castiel. Do you face the same issue when you train and run the agent without using the interctive learning?

yes @Juste. I found that it is successful when I convert the chinese words to unicode just like shown below.

Generated Story -176527246359742039

  • greet
    • utter_greet
  • water_leakage
    • utter_water_leakage
  • inform{“forms”: “\u9577\u8005\u7dad\u4fee\u6d25\u8cbc”}
    • slot{“forms”: “\u9577\u8005\u7dad\u4fee\u6d25\u8cbc”}
    • utter_solution_hkisland
  • goodbye
    • utter_goodbye

On the other hands, I found that if I use ’ ’ instead of " " for the quotation marks, it also gets error. Use " " is fine.

In the, I can manualy convert Chinese to unicode, then it was working. But how I can handel this when I doing the interactive learning? Because when I typing Chinese character during interactive learning, the error occurred "UnicodeEncodeError: ‘charmap’ codec can’t encode characters in position 579-580: character maps to <undefined>". I am using RASA 1.1.6 @Juste @cctong-castiel

1 Like