FormAction has no such method: extract()

Greetings.

I have have been using and loving the Rasa Stack for quite some time now.

I have encountered problems during FormAction validation. The examples given here and here use a method called extract() to get events (the last line of the below code snippet).

def validate(self, dispatcher, tracker, domain):
    # type: (CollectingDispatcher, Tracker, Dict[Text, Any]) -> List[Dict]
    """"Validate extracted requested slot else raise an error"""
    slot_to_fill = tracker.get_slot(REQUESTED_SLOT)

    # extract requested slot from a user input by using 'slot_mapping'
    events = self.extract(dispatcher, tracker, domain)

However the FormAction class has no such method (rasa_core; versions 0.12.3 and 0.12.4). As a possible hack, I have tried to use the extract_requested_slot() method, which returns a dictionary of slot: value pairs. This however is in conflict with line 388 of forms.py, which seems to expect a different data format. Not quite sure how to proceed. Any insight would be much appreciated.

Yes, we changed the inner logic there, but didn’t update the docs. The master version is updated now: Slot Filling

1 Like

Thank you. My validation process now runs smoothly