Comments (4)
Hi,
Testing today now works AOK both using speech and the python console in BST = UTC+1:
2017-08-29 18:16:42,524 - Skills - DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-US", "session": "6a596131-b324-4a82-9442-5db90661fe76", "utterances": ["what's the weather"]}, "context": null}
2017-08-29 18:16:42,685 - Skills - DEBUG - {"type": "WeatherSkill:CurrentWeatherIntent", "data": {"confidence": 0.5, "target": null, "intent_type": "WeatherSkill:CurrentWeatherIntent", "Weather": "weather", "__tags__": [{"end_token": 2, "start_token": 2, "from_context": false, "entities": [{"confidence": 1.0, "data": [["weather", "Weather"], ["Weather", "Concept"]], "key": "weather", "match": "weather"}], "key": "weather", "match": "weather"}], "utterance": "what's the weather"}, "context": {"target": null}}
2017-08-29 18:16:42,694 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
2017-08-29 18:16:43,303 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/owm/weather?q=Cramlington%2C+England%2C+United+Kingdom&lang=en HTTP/1.1" 200 451
2017-08-29 18:16:43,333 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
2017-08-29 18:16:43,896 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/owm/forecast/daily?q=Cramlington%2C+England%2C+United+Kingdom&lang=en HTTP/1.1" 200 2016
2017-08-29 18:16:43,908 - skill-weather__init__ - DEBUG - Forecast: {"status": "Clouds", "visibility_distance": null, "clouds": 92, "temperature": {"morn": 285.88, "min": 282.26, "max": 285.88, "night": 282.26, "eve": 285.07, "day": 285.88}, "dewpoint": null, "humidex": null, "detailed_status": "overcast clouds", "reference_time": 1504008000, "weather_code": 804, "sunset_time": 0, "rain": {}, "snow": {}, "pressure": {"press": 1011.87, "sea_level": null}, "sunrise_time": 0, "heat_index": null, "weather_icon_name": "04d", "humidity": 73, "wind": {"speed": 5.67}}
2017-08-29 18:16:43,910 - Display Manager (mycroft.client.enclosure) - DEBUG - Setting active skill to WeatherSkill
2017-08-29 18:16:43,914 - Skills - DEBUG - {"type": "enclosure.mouth.events.deactivate", "data": {}, "context": null}
2017-08-29 18:16:43,918 - Skills - DEBUG - {"type": "enclosure.weather.display", "data": {"temp": "13", "img_code": 1}, "context": null}
2017-08-29 18:16:43,919 - Display Manager (mycroft.client.enclosure) - DEBUG - Setting active skill to WeatherSkill
2017-08-29 18:16:43,931 - Skills - DEBUG - {"type": "speak", "data": {"expect_response": false, "utterance": "With a high of 13 and a low of 9, Cramlington has few clouds and is currently 13 degrees."}, "context": null}
The log above shows two HTTPS requests logged, and this time one response back.
As a bonus, the TTS reply gives Celsius temperatures, presumably as my account is set to Metric units ("systemUnit": "metric"
).
Thanks for all your help!
from skill-weather.
Firstly thank you for a very detailed error report.
I've seen similar issues due to the current date being out of scope for the weather service. If I'm correct that's not your problem since the location is Austin and this should only affect locations east of GMT.
So there is another issue here.
Can you try what's the weather like tomorrow
just to exclude the possibility of this being an issue for you as well.
from skill-weather.
Hi @forslund ,
Thanks for replying so quickly!
After a bit more debug, the skill can be made to call both working and failing GETs with slightly different speech queries. Both OK and ERROR API requests use my configured actual location (Cramlington, England, BST=UTC+1, logs are in UTC), suggesting it's not user location but the query. I can't tell if it is server-side, or a bad client request.
The superficial difference is the working request does one GET with two forecasts returned (today 13:00, tomorrow 13:00), with the failing request doing two GETs and no return logged.
The working GET is identical to the second failing GET.
"utterance": "will it rain today" - OK, Server returns JSON report for today and tomorrow at 13:00. 2017-08-25 11:13:21,994 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/owm/forecast/daily?q=Cramlington%2C+England%2C+United+Kingdom&lang=en HTTP/1.1" 200 1981 "utterance": "what is the weather" - FAIL, ERROR - Error: 'NoneType' object has no attribute 'to_JSON' 2017-08-25 11:13:41,118 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/owm/weather?q=Cramlington%2C+England%2C+United+Kingdom&lang=en HTTP/1.1" 200 454 2017-08-25 11:13:41,606 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/owm/forecast/daily?q=Cramlington%2C+England%2C+United+Kingdom&lang=en HTTP/1.1" 200 1981
I wonder if the skill is requesting a bad then a good GET, and exiting on the first error before the second (possibly) good data is returned?
And the full logs...
"utterance": "will it rain today" - OK, Server returns JSON report for today and tomorrow at 13:00.
2017-08-25 11:13:19,190 - Skills - DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-us", "utterances": ["will it rain today"]}, "context": null} 2017-08-25 11:13:19,288 - Skills - DEBUG - {"type": "WeatherSkill:NextPrecipitationIntent", "data": {"confidence": 1.0, "target": null, "Precipitation": "rain", "intent_type": "WeatherSkill:NextPrecipitationIntent", "Next": "will", "__tags__": [{"end_token": 0, "start_token": 0, "from_context": false, "entities": [{"confidence": 1.0, "data": [["will", "Next"]], "key": "will", "match": "will"}], "key": "will", "match": "will"}, {"end_token": 2, "start_token": 2, "from_context": false, "entities": [{"confidence": 1.0, "data": [["rain", "Precipitation"], ["rain", "WeatherType"]], "key": "rain", "match": "rain"}], "key": "rain", "match": "rain"}], "utterance": "will it rain today"}, "context": {"target": null}} 2017-08-25 11:13:19,291 - skill-weather__init__ - INFO - 2017-08-25 00:00:00 2017-08-25 11:13:19,291 - skill-weather__init__ - INFO - 2017-08-25 00:00:00 2017-08-25 11:13:19,299 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai 2017-08-25 11:13:21,994 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/owm/forecast/daily?q=Cramlington%2C+England%2C+United+Kingdom&lang=en HTTP/1.1" 200 1981 2017-08-25 11:13:22,007 - skill-weather__init__ - INFO - {"status": "Clouds", "visibility_distance": null, "clouds": 68, "temperature": {"morn": 291.35, "min": 285.99, "max": 292.72, "night": 285.99, "eve": 290.09, "day": 292.72}, "dewpoint": null, "humidex": null, "detailed_status": "broken clouds", "reference_time": 1503662400, "weather_code": 803, "sunset_time": 0, "rain": {}, "snow": {}, "pressure": {"press": 1014.41, "sea_level": null}, "sunrise_time": 0, "heat_index": null, "weather_icon_name": "04d", "humidity": 85, "wind": {"speed": 3.56}} 2017-08-25 11:13:22,008 - skill-weather__init__ - INFO - {"status": "Rain", "visibility_distance": null, "clouds": 12, "temperature": {"morn": 285.08, "min": 284.29, "max": 290.79, "night": 284.29, "eve": 289.45, "day": 290.52}, "dewpoint": null, "humidex": null, "detailed_status": "light rain", "reference_time": 1503748800, "weather_code": 500, "sunset_time": 0, "rain": {"all": 0.24}, "snow": {}, "pressure": {"press": 1013.4, "sea_level": null}, "sunrise_time": 0, "heat_index": null, "weather_icon_name": "10d", "humidity": 86, "wind": {"speed": 4.06}} 2017-08-25 11:13:22,010 - Display Manager (mycroft.client.enclosure) - DEBUG - Setting active skill to WeatherSkill 2017-08-25 11:13:22,014 - Skills - DEBUG - {"type": "speak", "data": {"expect_response": false, "utterance": "The forecast calls for light rain on Saturday"}, "context": null}
"utterance": "what is the weather" - FAIL, ERROR - Error: 'NoneType' object has no attribute 'to_JSON'
2017-08-25 11:13:40,428 - Skills - DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-us", "utterances": ["what is the weather"]}, "context": null} 2017-08-25 11:13:40,543 - Skills - DEBUG - {"type": "WeatherSkill:CurrentWeatherIntent", "data": {"confidence": 0.5, "target": null, "intent_type": "WeatherSkill:CurrentWeatherIntent", "Weather": "weather", "__tags__": [{"end_token": 2, "start_token": 2, "from_context": false, "entities": [{"confidence": 1.0, "data": [["weather", "Weather"], ["Weather", "Concept"]], "key": "weather", "match": "weather"}], "key": "weather", "match": "weather"}], "utterance": "what is the weather"}, "context": {"target": null}} 2017-08-25 11:13:40,551 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai 2017-08-25 11:13:41,118 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/owm/weather?q=Cramlington%2C+England%2C+United+Kingdom&lang=en HTTP/1.1" 200 454 2017-08-25 11:13:41,138 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai 2017-08-25 11:13:41,606 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/owm/forecast/daily?q=Cramlington%2C+England%2C+United+Kingdom&lang=en HTTP/1.1" 200 1981 2017-08-25 11:13:41,627 - skill-weather__init__ - ERROR - Error: 'NoneType' object has no attribute 'to_JSON'
from skill-weather.
Ok, then the issue is probably the same I saw earlier.
The current weather looks gets the date/time for the current date 2017-08-24 00:00 and is then converted to GMT Since you are at +1 this will be converted to 2017-08-23 23:00 and the check is then performed against the info from OWA wich doesn't provide the date in question and then None is returned.
I've was working on a fix but I had some issue with the response formating, will look at it more during Sunday. Feel free to check the code and work on the issue.
from skill-weather.
Related Issues (20)
- Prep for future update: don't pass 'lang=None' to LF functions HOT 3
- Bump pyowm to latest version HOT 5
- "great-weather-again" UX timing comment
- Wrong placeholder names in most of localized dialogs HOT 1
- sunset (and i would guess other timedates) wrongly adding tz HOT 13
- "Today" isn't translated with non-english clients in certain cases HOT 1
- Location regex/adapt intent wont work HOT 3
- Use own keys HOT 1
- 'what is temperature' only gives voice information HOT 1
- KeyError: 'timezone' in skill HOT 3
- Asking for sunset time reads the dialog file name
- No icon for "moderate rain" HOT 1
- No translation of the temperature scales HOT 2
- display issue kde bigscreen plasma
- Closing screen hangs on kde HOT 1
- Gui screens not staying up long enough to rea HOT 1
- Sunrise/sunset times are incorrect in UK whilst daylight savings are active (GMT -> BST) HOT 3
- skill.error while asking for the weather HOT 12
- wrong output in build_condition_dialog with non-english language HOT 1
- Error when I ask for the weather of a city in Italian
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skill-weather.