rasa: Action server is not responding (status code 500)

Rasa version:13.3

Python version: 3.6

Operating system (windows, osx, …):Windows 10

Issue: during the interactive training I try to run action_weather after I gave it the input text ‘what is the weather like in Italy?’

image

it does not look like it is failing but it seems like it is in the infinite loop or something because it is not returning anything

image

it is just not doing anything i am confused whether what can cause this issue

**Content of actions.py **:

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

from rasa_core.actions import Action
# from rasa_core_sdk import Action
# from rasa_core_sdk.events import SlotSet

from rasa_core_sdk import Action
from rasa_core_sdk.events import SlotSet

#from WeatherAPIXU.client

class ActionWeather(Action):
    def name(self):
        return 'action_weather'

    def run(self, dispatcher, tracker, domain):
        from apixu.client import ApixuClient
        api_key = '333'  # your apixu key
        client = ApixuClient(api_key)

        loc = tracker.get_slot('location')
        current = client.getcurrent(q=loc)

        country = current['location']['country']
        city = current['location']['name']
        condition = current['current']['condition']['text']
        temperature_c = current['current']['temp_c']
        humidity = current['current']['humidity']
        wind_mph = current['current']['wind_mph']

        response = """It is currently {} in {} at the moment. The temperature is {} degrees, the humidity is {}% and the wind speed is {} mph.""".format(
            condition, city, temperature_c, humidity, wind_mph)

        dispatcher.utter_message(response)
        return [SlotSet('location', loc)]


class ActionScheduleMeeting(Action):
    def name(self):
        return 'action_schedule_meeting'

    def run(self, dispatcher, tracker, domain):
        print('scheduling meeting is completed! ')
        pass


class ActionShowMeeting(Action):
    def name(self):
        return 'action_show_meeting'

    def run(self, dispatcher, tracker, domain):
        dispatcher.utter_message('Here is the meeting information!')
        return []

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

intents:
    - schedule_meeting
    - search_for_meeting
    - greet
    - inform
    - goodbye

entities:
    - meeting
    - time
    - location

slots:
    location:
         type: text
    time:
         type: text
    meeting:
         type: text

templates:
    utter_greet:
        - 'Hello, how can I help you?'
        - 'Hi, I am here to help.'
    utter_goodbye:
        - 'Talk to you later.'
        - 'Bye bye :('
    utter_ask_meeting_time:
        - 'What time would you like me to schedule your meeting?'
    utter_ask_location:
        - 'In what location?'
actions:
    - utter_greet
    - utter_goodbye
    - utter_ask_meeting_time
    - utter_ask_location
    - actions.ActionShowMeeting
    - actions.ActionWeather

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 27 (14 by maintainers)

Most upvoted comments

Awesome so there is no rasa issue! I’m glad we solved this now. Since this is an issue with your usage of the apixu I recommend checking out: https://github.com/apixu/apixu-python and https://www.apixu.com/doc/getting-started.aspx Good luck!