Open mistzy0321 opened 3 years ago
Same issue here:
>>> 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.