question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Facebook Quick replies doens't work

See original GitHub issue

Rasa version: 1.0.0

Python version: 3.7.0

Operating system (windows, osx, …):Ubuntu Linux

Issue: I get the following error When adding Quick replies for messenger :

Traceback (most recent call last):
  File "/home/rogers/paysikabot/lib/python3.7/site-packages/rasa/core/channels/facebook.py", line 94, in _handle_user_message
    await self.on_new_message(user_msg)
  File "/home/rogers/paysikabot/lib/python3.7/site-packages/rasa/core/channels/channel.py", line 68, in handler
    await app.agent.handle_message(*args, **kwargs)
  File "/home/rogers/paysikabot/lib/python3.7/site-packages/rasa/core/agent.py", line 441, in handle_message
    return await processor.handle_message(message)
  File "/home/rogers/paysikabot/lib/python3.7/site-packages/rasa/core/processor.py", line 74, in handle_message
    await self._predict_and_execute_next_action(message, tracker)
  File "/home/rogers/paysikabot/lib/python3.7/site-packages/rasa/core/processor.py", line 342, in _predict_and_execute_next_action
    action, tracker, message.output_channel, self.nlg, policy, confidence
  File "/home/rogers/paysikabot/lib/python3.7/site-packages/rasa/core/processor.py", line 453, in _run_action
    await self._send_bot_messages(events, tracker, output_channel)
  File "/home/rogers/paysikabot/lib/python3.7/site-packages/rasa/core/processor.py", line 374, in _send_bot_messages
    await output_channel.send_response(tracker.sender_id, e.message())
  File "/home/rogers/paysikabot/lib/python3.7/site-packages/rasa/core/channels/channel.py", line 173, in send_response
    **message
  File "/home/rogers/paysikabot/lib/python3.7/site-packages/rasa/core/channels/facebook.py", line 181, in send_quick_replies
    self.send(recipient_id, FBText(text=text, quick_replies=quick_replies))
  File "/home/rogers/paysikabot/lib/python3.7/site-packages/rasa/core/channels/facebook.py", line 120, in send
    self.messenger_client.send(element.to_dict(), recipient_id, "RESPONSE")
  File "/home/rogers/paysikabot/lib/python3.7/site-packages/fbmessenger/elements.py", line 27, in to_dict
    d['quick_replies'] = self.quick_replies.to_dict()
AttributeError: 'list' object has no attribute 'to_dict'

The error is due to the fact that you are using elements module from fbmessenger and in this element module, there is a Text class, which takes as constructor parameter, a quick_replies. But this quick_replies must be a list of QuickReply object. So you are not converting the information provide for Quick replies from the domain.yml into QuickReply Object. Kind of.

Content of configuration file (config.yml):

language: en
pipeline: supervised_embeddings   #  pretrained_embeddings_spacy

# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
  - name: MemoizationPolicy
  - name: KerasPolicy
  - name: FormPolicy

Content of domain file (domain.yml) (if used & relevant):


Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
RogersNtrcommented, May 30, 2019

Hey @erohmensing Yes, regular postback buttons like with “Buttons” key work fine. The ones which bug is the persistent Menu and QuickReplies (even when tried with custom). I just do a pull request with the bug fix.

0reactions
RogersNtrcommented, Jun 7, 2019

Yes @akelad I just resubmit a PR. I get some stuffs that I need to do for the certificate on my local repo; I did itand now it is pending.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quick Replies - Messenger Platform - Facebook for Developers
Quick replies provide a way to present a set of up to 13 buttons in-conversation that contain a title and optional image, and...
Read more >
Facebook Inbox: Missing Quick Replies - Help Center
At the moment, Facebook Inbox does not yet support the functionality of showing Quick Reply buttons, which might lead to some confusion.
Read more >
In-intent quick replies not working for facebook #310 - GitHub
My bot stopped showing quick replies on messenger which I showed using inside intent response. Now I am using payload to show quick...
Read more >
Facebook Messenger quick replies don't work - Fitbit Community
Since the recent update my Versa is still happily receiving the text, Facebook Messenger and Whattsapp notification, and I can Quick Reply to...
Read more >
Quick Replies not appearing in Facebook Messenger from ...
I am trying to make a few QR buttons appear in my FBM bot app. Everything is working fine, webhook ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found