Opened 11 years ago

Closed 5 years ago

#11991 closed Patch - Bug Fix (Unverified)

NWS script for alerts cannot handle some formats of geocode

Reported by: bkuhn@… Owned by: beirdo
Priority: minor Milestone: unknown
Component: Plugin - MythWeather Version: Unspecified
Severity: low Keywords:
Cc: Ticket locked: no

Description

Attached please find a patch that changes the geocode testing code in the nws-alert.pl script. I was getting errors like:

Argument "NY075" isn't numeric in int at ../mythtv/mythplugins/mythweather/mythweather/scripts/us_nws/nws-alert.pl line 125.

I analyzed the data and saw that the {int $geo} was being used, which doesn't work here. I added a change to remove the state and leading zeros from the geo, as that seems to match what the NOAA site sends back in the place where we are testing.

The patch is against git master as of right now (7f3d8f79d9a2e9f689249aea967d242e82708f3b), but it seems this script hasn't been changed since 114d4cdc58194b0c53fa7426b2edcbcee9433be3 on 2012-07-13.

Attachments (1)

nws-alert-better-geocode-test.patch (2.1 KB) - added by bkuhn@… 11 years ago.
nws-alert patch to remove state/leading 0's when testing against 'cap:geocode' field

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by bkuhn@…

nws-alert patch to remove state/leading 0's when testing against 'cap:geocode' field

comment:1 Changed 5 years ago by Stuart Auchterlonie

Resolution: Unverified
Status: newclosed

Closing all old tickets in trac.

If your issue still persists, please open an issue in Github https://github.com/MythTV/mythtv/issues

and reference the existing trac ticket.

Note: See TracTickets for help on using tickets.