Skip to content

Failed to run AIRMET example—potentially related to the retirement of TAC AIRMETs & transition to G-AIRMETs? #68

@kpcftsz

Description

@kpcftsz

In September '24, a service change notice was published by the NWS outlining efforts to transition away from TAC AIRMETs in favor of G-AIRMETs: https://www.weather.gov/media/notification/pdf_2023_24/scn24-92tac_airmet_retirement.pdf
G-AIRMETs may come in the form of XML. Info on the format is available here:
https://www.weather.gov/media/notification/ref/pdd_xml_g-airmet.pdf

Below is what I got when attempting to run an example from the AirSigManager documentation. I'm guessing this is related to the changes above affecting retrieval of WA..../WS.... text in particular.

Traceback (most recent call last):
  File "test.py", line 7, in <module>
    manager.update()
  File "/usr/local/lib/python3.8/dist-packages/avwx/current/airsigmet.py", line 167, in update
    return aio.run(self.async_update(timeout, disable_post))
  File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.8/dist-packages/avwx/current/airsigmet.py", line 188, in async_update
    exceptions.exception_intercept(exc, raw={"report": report})
  File "/usr/local/lib/python3.8/dist-packages/avwx/exceptions.py", line 8, in exception_intercept
    raise exception
  File "/usr/local/lib/python3.8/dist-packages/avwx/current/airsigmet.py", line 184, in async_update
    if obj := AirSigmet.from_report(report):
  File "/usr/local/lib/python3.8/dist-packages/avwx/base.py", line 72, in from_report
    obj.parse(report, issued=issued)
  File "/usr/local/lib/python3.8/dist-packages/avwx/base.py", line 85, in parse
    self._post_parse()
  File "/usr/local/lib/python3.8/dist-packages/avwx/current/airsigmet.py", line 87, in _post_parse
    self.data, self.units = parse(self.raw, self.issued)
  File "/usr/local/lib/python3.8/dist-packages/avwx/current/airsigmet.py", line 668, in parse
    data, bulletin, issuer, time, correction = _header(_parse_prep(sanitized))
  File "/usr/local/lib/python3.8/dist-packages/avwx/current/airsigmet.py", line 258, in _header
    bulletin = _bulletin(data[0])
  File "/usr/local/lib/python3.8/dist-packages/avwx/current/airsigmet.py", line 251, in _bulletin
    type=Code(repr=type_key, value=BULLETIN_TYPES[type_key]), # <- 
KeyError: 'TS'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions