Slot Mapping Dont Work and I can save entity as variable

Hello Guys, i have two problem with my code

First i want to use number as a variable for send a POST via API. It works if I use a custom entity (adding to the nlu.md) but it doesn’t work if I use duckling to extract number.

class AskIssueForm(FormAction):

def name(self) -> Text:
    return "ask_issue_form"

@staticmethod
def required_slots(tracker: Tracker) -> List[Text]:
    """A list of required slots that the form has to fill"""
    return ["number"]

def submit(self,
    dispatcher: CollectingDispatcher,
    tracker: Tracker,
    domain: Dict[Text, Any]) -> List[Dict]:
    id = tracker.get_slot("number")
    issue = get(id)
    """Define what the form has to do
        after all required slots are filled"""
    dispatcher.utter_message(issue.subject)
    return [AllSlotsReset()]

If i change “number” for “id”(custom) its works, but only with your own examples, if I try a different number you ask me again.

Second problem is Slot Mapping: if i add the slot mapping function the bot wrongly answers all the questions and the function doesn’t work

@staticmethod def required_slots(tracker: Tracker) → List[Text]: “”“A list of required slots that the form has to fill”“” return [“number”, “PER”, “email”]

def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
    return {
        "PER": [self.from_entity(entity="PER")],
        "number": [self.from_entity(entity="number"),
        "email": [self.from_entity(entity="email")]
    }

Thanks You Guys

Sounds like it could be a problem with Duckling. How are you running your duckling server? Could you share your config file?

For the slot mappings, it looks like you might be missing a square bracket in your slot_mappings function. What happens if you add one after "number": [self.from_entity(entity="number") right before the rightmost comma?