Skip to content

Commit 3c69ec4

Browse files
committed
temp fix to ignore phone number parse exception
1 parent 67017c8 commit 3c69ec4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/server/datasource_manager.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ def volgistics_address(index, street):
8484
def normalize_phone_number(number):
8585
if str(number) == 'nan':
8686
return ""
87-
parsed_number = phonenumbers.parse(number, "US")
87+
try:
88+
parsed_number = phonenumbers.parse(number, "US")
89+
except phonenumbers.phonenumberutil.NumberParseException:
90+
return ""
8891
return phonenumbers.format_number(parsed_number, phonenumbers.PhoneNumberFormat.NATIONAL)
8992

9093
SOURCE_NORMALIZATION_MAPPING = {

0 commit comments

Comments
 (0)