roe-dl / weewx-DWD

Darstellung von Wettersymbolen in WeeWX sowie Vorhersage- und Warndaten herunterladen und für WeeWX und Web-Darstellung aufbereiten
GNU General Public License v3.0
19 stars 4 forks source link

fix ValueError: could not convert string to float: 'dwd' #29

Closed hoetzgit closed 1 year ago

hoetzgit commented 1 year ago

Hallo, Du kannst Dir das ja mal ansehen, ich hatte nach c642c23 folgenden Fehler:

Traceback (most recent call last):
  File "/home/weewx/bin/weeutil/weeutil.py", line 1514, in to_int
    return int(x) if x is not None else None
ValueError: invalid literal for int() with base 10: 'dwd'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/weewx/bin/wee_reports", line 149, in <module>
    main()
  File "/home/weewx/bin/wee_reports", line 113, in main
    engine = weewx.engine.DummyEngine(config_dict)
  File "/home/weewx/bin/weewx/engine.py", line 93, in __init__
    self.loadServices(config_dict)
  File "/home/weewx/bin/weewx/engine.py", line 161, in loadServices
    obj = weeutil.weeutil.get_object(svc)(self, config_dict)
  File "/home/weewx/bin/user/dwd.py", line 694, in __init__
    self._create_poi_thread(station, station, station_dict)
  File "/home/weewx/bin/user/dwd.py", line 714, in _create_poi_thread
    self.threads[thread_name]['thread'] = DWDPOIthread(thread_name,
  File "/home/weewx/bin/user/dwd.py", line 264, in __init__
    self.iconset = weeutil.weeutil.to_int(iconset)
  File "/home/weewx/bin/weeutil/weeutil.py", line 1517, in to_int
    return int(float(x))
ValueError: could not convert string to float: 'dwd'

Grüße Henry

roe-dl commented 1 year ago

Hier müßte bittte noch der Wert "belchertown" mit dem Wert 4 hinzu, dann kann ich PR einlesen.