The application throws a NameError: name 'InlineKeyboardMarkup' is not defined when the send_text_with_buttons function on line 96 in chatwoot.py is called. This error appears when the Rasa NLU framework tries to process responses which include button options.
2023-09-26 10:19:24 DEBUG channels.chatwoot - name 'InlineKeyboardMarkup' is not defined
Traceback (most recent call last):
File "/app/channels/chatwoot.py", line 268, in message
await on_new_message(
File "/usr/local/lib/python3.8/site-packages/rasa/core/channels/channel.py", line 89, in handler
await app.ctx.agent.handle_message(message)
File "/usr/local/lib/python3.8/site-packages/rasa/core/agent.py", line 419, in handle_message
return await self.processor.handle_message( # type: ignore[union-attr]
File "/usr/local/lib/python3.8/site-packages/rasa/core/processor.py", line 161, in handle_message
await self._run_prediction_loop(message.output_channel, tracker)
File "/usr/local/lib/python3.8/site-packages/rasa/core/processor.py", line 819, in _run_prediction_loop
should_predict_another_action = await self._run_action(
File "/usr/local/lib/python3.8/site-packages/rasa/core/processor.py", line 952, in _run_action
await self.execute_side_effects(events, tracker, output_channel)
File "/usr/local/lib/python3.8/site-packages/rasa/core/processor.py", line 845, in execute_side_effects
await self._send_bot_messages(events, tracker, output_channel)
File "/usr/local/lib/python3.8/site-packages/rasa/core/processor.py", line 860, in _send_bot_messages
await output_channel.send_response(tracker.sender_id, e.message())
File "/usr/local/lib/python3.8/site-packages/rasa/core/channels/channel.py", line 229, in send_response
await self.send_text_with_buttons(
File "/app/channels/chatwoot.py", line 96, in send_text_with_buttons
reply_markup = InlineKeyboardMarkup()
NameError: name 'InlineKeyboardMarkup' is not defined