New submission from David Wahlund: File "C:\Python34\lib\imaplib.py", line 536, in login typ, dat = self._simple_command('LOGIN', user, self._quote(password)) File "C:\Python34\lib\imaplib.py", line 1141, in _simple_command return self._command_complete(name, self._command(name, *args)) File "C:\Python34\lib\imaplib.py", line 956, in _command_complete typ, data = self._get_tagged_response(tag) File "C:\Python34\lib\imaplib.py", line 1076, in _get_tagged_response self._get_response() File "C:\Python34\lib\imaplib.py", line 984, in _get_response resp = self._get_line() File "C:\Python34\lib\imaplib.py", line 1098, in _get_line if not line.endswith(b'\r\n'): TypeError: endswith first arg must be str or a tuple of str, not bytes
imaplib uses SSLContext to initiate a SSLSocket. It overrides makefile() from Socket. It in turn uses TextIOWrapper on top of the stream. TextIOWrapper.readline() returns an Unicode str but IMAP4._get_line() expects bytes. ---------- messages: 256124 nosy: David Wahlund priority: normal severity: normal status: open title: imaplib can't process lines after starttls type: crash versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25826> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com