daviddrysdale / python-phonenumbers

Python port of Google's libphonenumber

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phonenumbers don't work with italian numbers

lud50 opened this issue · comments

loc = phonenumbers.geocoder.description_for_number(cnum, "IT")
this formula return a empty string vwn is used with an italian number

Works for me:

Python 3.11.7 (main, Dec  9 2023, 06:23:53) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import phonenumbers
>>> phonenumbers.__version__
'8.13.38'
>>> cnum = phonenumbers.parse("(+39) 06.3691.8899", "IT")
>>> import phonenumbers.geocoder
>>> phonenumbers.geocoder.description_for_number(cnum, "IT")
'Rome'

Please provide an example of failure, along with a link to the upstream Java code being successful for the same inputs.

This sounds like a metadata issue, which should be dealt with upstream.