OpenVoiceOS / skill-ovos-weather

OpenVoiceOS official Weather Skill, providing weather conditions and forecasts.
Apache License 2.0
1 stars 4 forks source link

'what is the weather in baltimore' returns an error #30

Closed goldyfruit closed 1 year ago

goldyfruit commented 1 year ago
2023-03-28 15:55:03.544 - skill-ovos-weather.openvoiceos - ERROR - Unexpected error retrieving weather
Traceback (most recent call last):
  File "/home/ovos/.local/share/mycroft/skills/skill-ovos-weather.openvoiceos/__init__.py", line 1042, in _get_weather
    latitude, longitude = self._determine_weather_location(intent_data)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.local/share/mycroft/skills/skill-ovos-weather.openvoiceos/__init__.py", line 1086, in _determine_weather_location
    latitude = intent_data.geolocation["latitude"]
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.local/share/mycroft/skills/skill-ovos-weather.openvoiceos/skill/intent.py", line 56, in geolocation
    self._geolocation = get_geolocation(self.location)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.local/share/mycroft/skills/skill-ovos-weather.openvoiceos/skill/util.py", line 105, in get_geolocation
    geolocation = geolocation_api.get_geolocation(location)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/mycroft/deprecated/api.py", line 184, in get_geolocation
    return self._real_api.get_geolocation(location)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_backend_client/api.py", line 351, in get_geolocation
    return self.backend.geolocation_get(location)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_backend_client/backends/offline.py", line 171, in geolocation_get
    "code": details["addresstags"].get("postcode") or details["calculated_postcode"] or "",
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'get'
emphasize commented 1 year ago

can you please reopen in ovos_backend_client?

note: some intents require("Location") - emphasis on uppercase - which creates a uppercase "Location" key in message.data and thus None with message.data.get("location") , but this is not the case here

goldyfruit commented 1 year ago

can you please reopen in ovos_backend_client?

Done.

Thanks for the explaination.