AttributeError : with pycountry

#21 · closed · 3 comments

View on GitHub ↗

noraj

Did someone already have this issue: ``` $ python3 app.py Traceback (most recent call last): File "app.py", line 9, in <module> from utils import misc, select File "/home/shark/Dev/ColdCore/utils/select.py", line 24, in <module> Countries = [(country.alpha3, country.name) for country in pycountry.countries] File "/home/shark/Dev/ColdCore/utils/select.py", line 24, in <listcomp> Countries = [(country.alpha3, country.name) for country in pycountry.countries] File "/usr/lib/python3.6/site-packages/pycountry/db.py", line 22, in __getattr__ raise AttributeError AttributeError ``` `/usr/lib/python3.6/site-packages/pycountry/db.py`: ```python [...] def __getattr__(self, key): if key not in self._fields: raise AttributeError return self._fields[key] [...] ```

Comments

jamiees2

It seems like `alpha3` has changed to `alpha_3` in the latest version of pycountry.

jamiees2

This was fixed in a PR that I missed, so this has been fixed now :)

noraj

I confirm it's solved.