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

@fissehab

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'

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