You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relatively dumb when it comes to coding. Tried specifying one SAMECODE, got that. Specified 2, got the same results. Same happened when I tried to use a state. Omitting most of the unnecessary code to save 180 or so lines.
importweatheralertsfromweatheralertsimportWeatherAlertsnws=WeatherAlerts(samecodes='022055') #not my SAMECODE, random one I planned on using to test as it had a flash flood warning in effectforalertinnws.alerts:
print(f"{alert.areadesc}: {alert.title}")
Originally was writing to a file as well, but shouldn't make a difference here whether or not I change it to a print string.
The text was updated successfully, but these errors were encountered:
>>> from weatheralerts import WeatherAlerts
>>> nws = WeatherAlerts(samecodes='012057')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/homebrew/lib/python3.9/site-packages/weatheralerts/weather_alerts.py", line 27, in __init__
self.geo = GeoDB()
File "/opt/homebrew/lib/python3.9/site-packages/weatheralerts/geo.py", line 17, in __init__
self.__same = SameCodes()
File "/opt/homebrew/lib/python3.9/site-packages/weatheralerts/geo.py", line 95, in __init__
self._load_same_codes()
File "/opt/homebrew/lib/python3.9/site-packages/weatheralerts/geo.py", line 111, in _load_same_codes
self._cached_same_codes()
File "/opt/homebrew/lib/python3.9/site-packages/weatheralerts/geo.py", line 148, in _cached_same_codes
self.reload()
File "/opt/homebrew/lib/python3.9/site-packages/weatheralerts/geo.py", line 104, in reload
self._load_same_codes(refresh=True)
File "/opt/homebrew/lib/python3.9/site-packages/weatheralerts/geo.py", line 109, in _load_same_codes
self._get_same_codes()
File "/opt/homebrew/lib/python3.9/site-packages/weatheralerts/geo.py", line 121, in _get_same_codes
code, local, state = str(row).strip().split(',')
ValueError: not enough values to unpack (expected 3, got 1)
Relatively dumb when it comes to coding. Tried specifying one SAMECODE, got that. Specified 2, got the same results. Same happened when I tried to use a state. Omitting most of the unnecessary code to save 180 or so lines.
Originally was writing to a file as well, but shouldn't make a difference here whether or not I change it to a print string.
The text was updated successfully, but these errors were encountered: