Multiple Custom Action not working on Invoke from Online Training

Rasa Core version: 0.12.2

Python version: 3.6.5

Operating system : Windows Server R2 2012

Issue : My Domain File : … actions:

  • action_login
  • action_logout …

my Action.py file has something like below :

class ActionLogin(Action):
  def name(self):
  return 'action_login'
def run(self, dispatcher, tracker, domain):

  client = client('myorg/wsdl')
sesid = client.login()
response = "Login Success"

dispatcher.utter_message(response)
return [slotset('sessionid', sesid]

    class ActionLogout(Action):
    def name(self):
    return 'action_logout'
    def run(self, dispatcher, tracker, domain):
    sesid = tracker.get_slot('sessionid'))
      client = client('myorg/wsdl') 
      sesid = client.logoff() response = "Logout Success"

      dispatcher.utter_message(response) 
      return [slotset('sessionid', sesid]

My training is successful, when I try to invoke the action login is running successfully, when I invoke logout, NotImplementedError : An action must implement its run method

Any help would be much appreciated.

Can you format your code snippet properly? Use the ``` for formatting.

Can you post a screenshot of the error?

Also, in your return, you missed a bracket. It should be:

return [slotset('sessionid', sesid)]