Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Country aliases not resolved on normalization #11

Open
kdeldycke opened this issue May 21, 2015 · 0 comments
Open

Country aliases not resolved on normalization #11

kdeldycke opened this issue May 21, 2015 · 0 comments
Labels

Comments

@kdeldycke
Copy link
Contributor

Non standard, addresses' country code are not normalized to their good values, even if defined as alias in territory.py:

>>> import postal_address
>>> postal_address.__version__
'0.7.1'
>>> from postal_address import Address
>>> Address(country_code='EL')
  File "(...)/postal_address-0.7.1-py2.7.egg/postal_address/address.py", line 152, in __repr__
  File "(...)/postal_address-0.7.1-py2.7.egg/postal_address/address.py", line 456, in country_name
  File "(...)/postal_address-0.7.1-py2.7.egg/postal_address/address.py", line 445, in country
  File "(...)/pycountry-1.10-py2.7.egg/pycountry/db.py", line 114, in get
    return self.indices[field][value]
KeyError: 'EL'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant