porimol / countryinfo

A python module for returning data about countries, ISO info and states/provinces within them.
MIT License
140 stars 44 forks source link

Please add Myanmar and its info (currencies, etc) #37

Open tanagnostis opened 2 years ago

tanagnostis commented 2 years ago

Hi!

Is it possible to add Myanmar and its info?

Thanks

voidus commented 2 years ago

There's already an entry about Burma. As far as I can see, the library doesn't yet have an approach to handle situations like that.

jeanbaptisteb commented 2 years ago

There's already an entry about Burma. As far as I can see, the library doesn't yet have an approach to handle situations like that.

I'm running into the same issue. I installed the package today from pip (never used or installed it before), and "Burma" as an alternative to "Myanmar" is not available either.

from countryinfo import CountryInfo
CountryInfo("Burma").info()

throws the error KeyError: 'burma' I uninstalled the package and reinstalled it, the problem is still here. I'm under windows 10, Python 3.7, 64bits, the installed package version is countryinfo-0.1.2.

Maybe "Burma" is only available in the development version?

voidus commented 2 years ago

Okay I had a look at the code and burma.json isn't loaded because it doesn't have a name entry. Since I'm just a passer-by, I can't speak on the intentions. The code that ignores those files is there since the first commit as far as I can tell.

FWIW, these files don't have a name set:

['antarctica.json',
 'ashmore_and_cartier_island.json',
 'burma.json',
 'clipperton_island.json',
 'europa_island.json',
 'gaza_strip.json',
 'glorioso_islands.json',
 'holy_see_vatican_city.json',
 'hungary.json',
 'ireland_northern.json',
 'jan_mayen.json',
 'jarvis_island.json',
 'johnston_atoll.json',
 'juan_de_nova_island.json',
 'midway_islands.json',
 'netherlands_antilles.json',
 'west_bank.json',
 'virgin_islands.json']