Nothing happens when I click on the button

I am writing a custom function for buttons. I am reading a file that has lines like this -> title, /intent{"key": "value"}.

Each line corresponds to a button with the first value being the button title while the second one is the payload with an intent and entities. When i run this, the button appears alright but when i click on the button, nothing happens. I checked the logs, nothing gets returned.

But when i changed the second value from /intent{"key": "value"} to just /intent{}, then the click is returning the value.

Can anyone help me understand as to why is this happening. Thanks!

@akshayg11 Can you share some more details? You mention that you are writing a custom function, how does it look like? Please, also share the log output, it helps to reproduce the steps. Thanks.

@Tanja The code is below.

class ButtonShower():

@classmethod
def button_shower(cls,
                  file_name: Text
                  ) -> List[Dict[Text, Any]]:
    file_data = pd.read_csv(file_name, header=None)
    data_dict = dict(zip(file_data[0], file_data[1]))
    buttons = []
    for k, v in data_dict.items():
        buttons.append(
            {
                'title': k,
                'payload': v,
            }
        )
    print(buttons)
    return buttons

I call the above function from inside of another action (below) and just use the buttons that gets returned from above.

     <some code before>                
     except:            
                buttons = ButtonShower.button_shower(self.file_name)
                message = "Please select one"
                dispatcher.utter_message(text=message, buttons=buttons)

The output of print(buttons) is below

[{'title': 'Lobby', 'payload': '/zone_comparison{"zone": "lobby"}'}, {'title': '11th Floor', 'payload': '/zone_comparison{"zone": "lobby"}'}, {'title': 'South Entrance', 'payload': '/zone_comparison{"zone": "lobby"}'}, {'title': 'North Entrance', 'payload': '/zone_comparison{"zone": "lobby"}'}]

But the payload is not getting executed when i click on the button.

@Tanja Hi… any solution to this issue?

Hi @akshayg11, when you click on one of the buttons, what does the Rasa Open Source server log show? How about the action server’s? You can run them with the --debug flag to see more details.

@fede @Tanja Below are the logs. Nothing shows on the logs after clicking on the button.

Rasa core logs

Rasa actions log

@fede @Tanja awaiting response on this one. Also an update, It works with the interactive mode.

@akshayg11 It actually looks good. What kind of frontend are you using? Did you change anything to make it work in interactive mode? Could you maybe share your code somewhere with us, so that we can have a closer look?