Skip to content
This repository was archived by the owner on Oct 14, 2018. It is now read-only.
This repository was archived by the owner on Oct 14, 2018. It is now read-only.

Not getting some zip codes #17

Description

@fissehab

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions