dglent / meteo-qt

System tray application for weather status information
GNU General Public License v3.0
82 stars 21 forks source link

'NoneType' object has no attribute 'split' #93

Closed jose1711 closed 4 years ago

jose1711 commented 4 years ago
2019/09/27 10:44:35 CRASH:
--------------------------------------------------------------------------------
<class 'AttributeError'>         
'NoneType' object has no attribute 'split'
--------------------------------------------------------------------------------
  File "/usr/lib/python3.7/site-packages/meteo_qt/meteo_qt.py", line 1405, in done
    self.overviewcity()
  File "/usr/lib/python3.7/site-packages/meteo_qt/meteo_qt.py", line 329, in overviewcity
    rise_str = self.utc('Sunrise', 'weatherdata')
  File "/usr/lib/python3.7/site-packages/meteo_qt/meteo_qt.py", line 457, in utc
    self.weatherDataDico[rise_set].split('T')[1].split(':')

INFO: Actual weather status for: Bratislava SK 18.1° pretrhaná oblačnosť - 1667: meteo_qt

The issue is caused by OWM not reporting values for Sunrise/Sunset.

{'Id': '3060972', 'City': 'Bratislava', 'Country': 'SK', 'Temp': '18.51°', 'Meteo': 'pretrhaná oblačnosť', 'Humidity': ('77', '%'), 'Wind': ('2.6', 'slabý vietor', '180', 'J', 'Juh'), 'Clouds': '75% pretrhaná oblačnosť', 'Pressure': ('1017', 'hPa'), 'Sunrise': None, 'Sunset': None, 'Precipitation': ('no', '')}
dglent commented 4 years ago

Thanks for reporting this

i will check soon