-
Notifications
You must be signed in to change notification settings - Fork 728
Mail helper library breaks with unicode recipient names #334
Copy link
Copy link
Closed
Labels
status: help wantedrequesting help from the communityrequesting help from the communitytype: bugbug in the librarybug in the library
Description
I encountered an issue using the helper library to send mails to recipients with unicode first name / last name:
File "/usr/local/lib/python2.7/dist-packages/sendgrid/helpers/mail/mail.py", line 379, in __init__ self.value = value
File "/usr/local/lib/python2.7/dist-packages/sendgrid/helpers/mail/mail.py", line 395, in value self._value = str(value)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128)
sendgrid-python/sendgrid/helpers/mail/mail.py
Line 395 in a5c1561
| self._value = str(value) |
Setting the encoding of the python document to utf-8 does not resolve/affect this issue. The code is converting unicode values to ascii.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: help wantedrequesting help from the communityrequesting help from the communitytype: bugbug in the librarybug in the library