Hello,
I am seeing an error saying “UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x92 in position 707: invalid start byte”. I have tried both solutions searched from the internet and neither works.
Option 1: In your terminal before using rasa, try: export PYTHONIOENCODING=‘utf8’
Option 2: put it as part of the command, like PYTHONIOENCODING=‘utf8’ rasa train
Can someone please help me out? Thanks in advanced. Below is from domain file.
from typing import Dict, Text, Any, List, Union, Optional, Tuple from rasa_sdk import Action, Tracker from rasa_sdk.executor import CollectingDispatcher from rasa_sdk.forms import FormAction from rasa_sdk import Action from rasa_sdk.events import UserUtteranceReverted import typing
class SalesForm(FormAction): “”“Collects sales information and adds it to the spreadsheet”""
def name(self) -> Text:
return "sales_form"
@staticmethod
def required_slots(tracker) -> List[Text]:
return [
"job_function",
"use_case",
"budget",
"person_name",
"company",
"business_email",
]
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
return {"use_case": self.from_text(intent="inform")}
def submit(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> List[Dict]:
dispatcher.utter_message("Thanks for getting in touch, we’ll contact you soon")
return []
class ActionGreetUser(Action): “”“Revertible mapped action for utter_greett”""
def name(self):
return "action_greet"
def run(self, dispatcher, tracker, domain):
dispatcher.utter_template("utter_greet", tracker)
return [UserUtteranceReverted()]
class ActionDefaultAskAffirmation(Action):
def name(self) -> Text:
return "action_default_ask_affirmation"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
dispatcher.utter_message("Sorry, I'm not sure I've understood ")
return []