Nikita Velykanov <[email protected]> added the comment:
Thank you for fast reply.
Here's full traceback for first case:
Traceback (most recent call last):
File "some_my_file.py", line 10, in some_function
self.mail.login(login, password)
File "/usr/lib64/python2.7/imaplib.py", line 518, in login
typ, dat = self._simple_command('LOGIN', user, self._quote(password))
File "/usr/lib64/python2.7/imaplib.py", line 1083, in _simple_command
return self._command_complete(name, self._command(name, *args))
File "/usr/lib64/python2.7/imaplib.py", line 870, in _command
self.send('%s%s' % (data, CRLF))
File "/usr/lib64/python2.7/imaplib.py", line 1191, in send
sent = self.sslobj.write(data)
File "/usr/lib64/python2.7/ssl.py", line 669, in write
return self._sslobj.write(data)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 30-39:
ordinal not in range(128)
Full traceback for second case:
Traceback (most recent call last):
File "some_my_file.py", line 10, in some_function
self.mail.login(login, password)
File "/usr/lib64/python2.7/imaplib.py", line 518, in login
typ, dat = self._simple_command('LOGIN', user, self._quote(password))
File "/usr/lib64/python2.7/imaplib.py", line 1083, in _simple_command
return self._command_complete(name, self._command(name, *args))
File "/usr/lib64/python2.7/imaplib.py", line 852, in _command
data = '%s %s' % (data, self._checkquote(arg))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 1: ordinal
not in range(128)
But okay, even if encoding depends on target system and it's usually utf-8 so
why string operations in imaplib are not in usual format but in some other?
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34577>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com