You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unicode display name causes UnicodeEncodeError in sparkpost.transmissions.send() in Python 2.7 #155
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 9: ordinal not in range(128)
...
File "sparkpost/transmissions.py", line 253, in send
payload = self._translate_keys(**kwargs)
File "sparkpost/transmissions.py", line 76, in _translate_keys
bcc_copies = self._format_copies(recipients, bcc)
File "sparkpost/transmissions.py", line 100, in _format_copies
'header_to': self._format_header_to(recipients[0])
File "sparkpost/transmissions.py", line 109, in _format_header_to
email=recipient['address']['email']
Should it accept a unicode string as a param? It did in an earlier version - tested on v1.2.0 so far.
Activity
wodow commentedon Aug 10, 2017
The exception is raised at https://github.com/SparkPost/python-sparkpost/blame/master/sparkpost/transmissions.py#L105
The inline string there will be a
strin Python 2, so can't interpolate a unicode string.