pycountry icon indicating copy to clipboard operation
pycountry copied to clipboard

Fuzzy search for 'England' no longer works as documented.

Open gwbarrett opened this issue 3 years ago • 7 comments

Starting with pycountry-22.1.10, pycountry.countries.search_fuzzy('England') throws a LookupError instead of the Country object for the United Kingdom.

I noticed that the test for this was removed, so I guess this is just a documentation bug.

gwbarrett avatar Jan 14 '22 19:01 gwbarrett

Seconded, but really this is a failure, not a docs bug.

mgdelmonte avatar Mar 04 '22 16:03 mgdelmonte

Thirded!

nschimmoller avatar May 27 '22 11:05 nschimmoller

I think it's probably just a docs bug because the failure is due to a change in the underlying ISO files, not a code failure.

gwbarrett avatar Jun 14 '22 13:06 gwbarrett

@gwbarrett that's an interesting observation. Do we know what commit changed the ISO file to the point of it not changing. Could be rather easy to then create a new commit to reintroduce that functionality.

nschimmoller avatar Jun 14 '22 13:06 nschimmoller

Should the docs then just be updated?

jasonoberme avatar Jun 15 '22 13:06 jasonoberme

@gwbarrett @mgdelmonte and @jasonoberme I've created PR #124 that should restore this functionality.

nschimmoller avatar Jul 21 '22 16:07 nschimmoller

The removal of UK's subdivisions was an accidental change in the upstream iso-codes distribution and should go away when pycountry updates to version 4.10.0 (or greater), released on 2022-06-01, of iso-codes.

n-st avatar Aug 02 '22 00:08 n-st

Any updates when this will be fixed?

theholy7 avatar Feb 28 '23 14:02 theholy7

This issue has been resolved as of 23.12.7 release. Please update you pycountry version

pip install pycountry --upgrade

nschimmoller avatar Dec 08 '23 19:12 nschimmoller