1👍
✅
You can force the use of regular string with:
def format_phone(phone_str=None):
phone_str = phone_str.encode('ascii', 'ignore')
[...]
as shown here
Source:stackexchange.com