Not getting some zip codes
I want to get time zone from different zip codes I have and it works fine with most of them but it fails with some of them. I have given an example zip code that USPS website tells me it is located in Dayton, VA but pyzipcode does not get it.
from pyzipcode import ZipCodeDatabase
zcdb = ZipCodeDatabase()
zipcode = zcdb['228211']
zipcode.timezone
Traceback (most recent call last): File "/tmp/zeppelin_pyspark-8259722359721099871.py", line 308, in
raise Exception(traceback.format_exc()) Exception: Traceback (most recent call last): File "/tmp/zeppelin_pyspark-8259722359721099871.py", line 301, in exec(code) File " ", line 3, in File "/usr/lib/envs/env-608-ver-892-a-4.2.9-py-2.7.13/lib/python2.7/site-packages/pyzipcode/init.py", line 167, in getitem raise IndexError("Couldn't find zipcode: '%s'" % zipcode) IndexError: Couldn't find zipcode: 'None'