Action is not working

Whenever I am asking a question regarding database it is not giving me the output. Example
Me - my pf uan number Bot -

Domain.yml `intents:

  • agent.acquaintance
  • agent.age


    - "I'm a virtual agent"
    - "Think of me as a virtual agent."
    - "Well, I'm not a person, I'm a virtual agent."
    - "I'm a virtual being, not a real person."
    - "I'm a conversational app."

    - "I prefer not to answer with a number. I know I'm young."
    - "I was created recently, but don't know my exact age."
    - "Age is just a number. You're only as old as you feel."


  • utter_agent.acquaintance
  • utter_agent.age
  • action_db`

`## story 01


  • utter_agent.acquaintance

    story 02


  • utter_agent.age

    Story 87


  • action_db`

`## intent:pf.uan.number
  • Give my uan number
  • Lets go
  • my pf uan number
  • Your pf uan number
  • What is pf uan number? `

`from __future__ import absolute_import
 from __future__ import division
 from __future__ import unicode_literals
 from rasa_core_sdk import Action

import pymysql

class ActionDb(Action):
          def name(self):
    return 'action_db'
def run(self, dispatcher, tracker, domain):
    db = pymysql.connect("","admin","abcdefg","dbname")
    cursor = db.cursor()
    query = "SELECT COL_2 FROM csv_db1.TABLE_2 WHERE COL_1 = '" + str1 + "'"
    data = cursor.fetchone()
    return []


Hi, what sort of output are you getting in your action server, any errors? If you run the action server on --debug mode?

1 Like

It is fixed now. but thank you for your response.