DWD warnings

128 views
Skip to first unread message

Stefan Gliessmann

unread,
Jul 14, 2023, 7:53:03 AM7/14/23
to weewx-user
Hi folks -

I had everything configured correctly and got the warnings correctly displayed in the Belchertown skin.
Yesterday, I enabled DWD forecasts, too.

Since then, DWD forecasts are working and the DWD warnings have stopped working.

I cannot figure out what I may have changed in the weewx.conf.

Here is the output of: dwd-cap-warnings --weewx -v

teffi@weewx:/etc/weewx$ sudo dwd-cap-warnings --weewx -v
Using configuration file /etc/weewx/weewx.conf
Traceback (most recent call last):
  File "/usr/local/bin/dwd-cap-warnings", line 1992, in <module>
    cap = CAPwarnings(config,provider,options.verbose)
  File "/usr/local/bin/dwd-cap-warnings", line 1760, in __init__
    sec_dict = accumulateLeaves(config_dict['WeatherServices']['warning'][sec])
  File "/usr/local/bin/dwd-cap-warnings", line 142, in accumulateLeaves
    y.update({a:x.parent.parent[a] for a in x.parent.parent.scalars})
AttributeError: 'str' object has no attribute 'parent'

Can anybody point me to the item I need to change in weewx.conf?

TIA,
Stefan

Karen K

unread,
Jul 14, 2023, 1:39:24 PM7/14/23
to weewx-user
Could you provide the weewx.conf, that causes the problem? Please, make sure to obfuscate user names and passwords within that file before.

Stefan Gliessmann

unread,
Jul 17, 2023, 9:31:12 AM7/17/23
to weewx-user
I solved it by reverting back to a previous saved weewx.conf ;)

Thank you, Karen, nevertheless!

Stefan Gliessmann

unread,
Jul 9, 2024, 10:40:52 AM7/9/24
to weewx-user
After updating to WeeWx 5.0 I got DWD forecasts and warnings working, but since several days DWD warnings are no longer updated.
I am getting the same error message as one year ago ...

teffi@WXvm:/etc/weewx$ sudo dwd-cap-warnings --resolution=city --verbose

Using test configuration

-- configuration data ----------------------------------

log success:   True

log failure:   True

filter area:   {'Stadt Döbeln': 'DL', 'Stadt Leipzig': 'L', 'Stadt Jena': 'J', 'Stadt Dresden': 'DD'}

target path:   .

icon URL:      ../dwd/warn_icons_50x50

logo URL:      None

-- configuration dict ----------------------------------

{

    "log_success": true,

    "log_failure": true,

    "path": ".",

    "dwd_icons": "../dwd/warn_icons_50x50",

    "dwd_resolution": "city",

    "1": {

        "path": ".",

        "provider": "MSC",

        "office": "CWHX",

        "county": "Upper Lake Melville",

        "file": "XX"

    },

    "counties": {

        "Kreis Mittelsachsen - Tiefland": "DL",

        "Stadt Leipzig": "L",

        "Stadt Jena": "J",

        "Stadt Dresden": "DD"

    },

    "cities": {

        "Stadt Döbeln": "DL",

        "Stadt Leipzig": "L",

        "Stadt Jena": "J",

        "Stadt Dresden": "DD"

    }

}

--------------------------------------------------------

-- get_warnings -------------------------------

INFO about to download zip file list from https://opendata.dwd.de/weather/alerts/cap/COMMUNEUNION_CELLS_STAT

INFO zip file list from https://opendata.dwd.de/weather/alerts/cap/COMMUNEUNION_CELLS_STAT/ successfully downloaded

INFO processing file Z_CAP_C_EDZW_LATEST_PVW_STATUS_PREMIUMCELLS_COMMUNEUNION_DE.zip

INFO about to download https://opendata.dwd.de/weather/alerts/cap/COMMUNEUNION_CELLS_STAT/Z_CAP_C_EDZW_LATEST_PVW_STATUS_PREMIUMCELLS_COMMUNEUNION_DE.zip

INFO successfully downloaded https://opendata.dwd.de/weather/alerts/cap/COMMUNEUNION_CELLS_STAT/Z_CAP_C_EDZW_LATEST_PVW_STATUS_PREMIUMCELLS_COMMUNEUNION_DE.zip

teffi@WXvm:/etc/weewx$ sudo dwd-cap-warnings --resolution=city --verbose --weewx

Using configuration file /etc/weewx/weewx.conf

Traceback (most recent call last):

  File "/usr/local/bin/dwd-cap-warnings", line 1993, in <module>

    cap = CAPwarnings(config,provider,options.verbose)

  File "/usr/local/bin/dwd-cap-warnings", line 1761, in __init__

    sec_dict = accumulateLeaves(config_dict['WeatherServices']['warning'][sec])

  File "/usr/local/bin/dwd-cap-warnings", line 142, in accumulateLeaves

    y.update({a:x.parent.parent[a] for a in x.parent.parent.scalars})

AttributeError: 'str' object has no attribute 'parent'

teffi@WXvm:/etc/weewx$ sudo dwd-cap-warnings --resolution=county --verbose --weewx

Using configuration file /etc/weewx/weewx.conf

Traceback (most recent call last):

  File "/usr/local/bin/dwd-cap-warnings", line 1993, in <module>

    cap = CAPwarnings(config,provider,options.verbose)

  File "/usr/local/bin/dwd-cap-warnings", line 1761, in __init__

    sec_dict = accumulateLeaves(config_dict['WeatherServices']['warning'][sec])

  File "/usr/local/bin/dwd-cap-warnings", line 142, in accumulateLeaves

    y.update({a:x.parent.parent[a] for a in x.parent.parent.scalars})

AttributeError: 'str' object has no attribute 'parent'


and my /etc/weewx/weewx.conf

[DeutscherWetterdienst]

    # Konfiguration für dwd-cap-warnings

    [[warning]]

        icons = ../images

        states = Niedersachsen

        resolution = county|city

        [[[counties]]]

            Kreis Hildesheim = HIX

        [[[cities]]]

            Stadt Hildesheim = HI

[WeatherServices]

    path = /etc/weewx/skins/Belchertown/dwd

    [[current]]

        safe = True

    [[forecast]]

        icons = ../images

        orientation = "h,v"

        show_obs_symbols = True

        show_obs_description = True

        show_placemark = True

    [[warning]]

        icons = ../images

        # icons = replace_me

        [[[103254000]]]

            provider = BBK

            # Die Überschrift ist die Kreiskennung.

            file = HIX

        [[[Hildesheim]]]

            provider = BBK

            county = 8032540210000

            file = HI


    [[Belchertown]]

        section = Belchertown

        warnings = HIX

        forecast = K1546

        include_advance_warings = 3600

        aqi_source = aeris

        #compass_lang = replace_me


any hint would be highly appreciate ...

Thank you,
Stefan

Stefan Gliessmann

unread,
Jul 9, 2024, 10:51:02 AM7/9/24
to weewx-user

[WeatherServices]

    path = /etc/weewx/skins/Belchertown/dwd

    [[current]]

        safe = True

    [[forecast]]

        icons = ../images

        orientation = "h,v"

        show_obs_symbols = True

        show_obs_description = True

        show_placemark = True

    [[warning]]

        # icons = ../images

        # icons = replace_me

        [[[103254000]]]

            provider = BBK

            # Die Überschrift ist die Kreiskennung.

            file = HIX

        [[[Hildesheim]]]

            provider = BBK

            county = 8032540210000

            file = HI


For whatever reason, if I comment the location of the icons in the warning section, it works again!!!

Apologies for the extra spam!
Reply all
Reply to author
Forward
0 new messages