This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: imaplib module broken by str to unicode conversion
Type: crash Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: draghuram, hdima
Priority: normal Keywords:

Created on 2008-08-29 14:05 by hdima, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg72137 - (view) Author: Dmitry Vasiliev (hdima) Date: 2008-08-29 14:05
Example:

>>> from imaplib import IMAP4
>>> m = IMAP4("localhost")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/py3k/Lib/imaplib.py", line 185, in __init__
    self.welcome = self._get_response()
  File "/py3k/Lib/imaplib.py", line 912, in _get_response
    if self._match(self.tagre, resp):
  File "/py3k/Lib/imaplib.py", line 1021, in _match
    self.mo = cre.match(s)
TypeError: can't use a string pattern on a bytes-like object
>>> m = IMAP4(b"localhost")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/py3k/Lib/imaplib.py", line 185, in __init__
    self.welcome = self._get_response()
  File "/py3k/Lib/imaplib.py", line 912, in _get_response
    if self._match(self.tagre, resp):
  File "/py3k/Lib/imaplib.py", line 1021, in _match
    self.mo = cre.match(s)
TypeError: can't use a string pattern on a bytes-like object
msg72138 - (view) Author: Raghuram Devarakonda (draghuram) (Python triager) Date: 2008-08-29 14:14
This seems to be duplicate of #1210.
msg72139 - (view) Author: Dmitry Vasiliev (hdima) Date: 2008-08-29 14:17
Ah, yes.
History
Date User Action Args
2022-04-11 14:56:38adminsetgithub: 47978
2008-08-29 14:17:42hdimasetmessages: + msg72139
2008-08-29 14:14:11draghuramsetstatus: open -> closed
resolution: duplicate
messages: + msg72138
nosy: + draghuram
2008-08-29 14:05:33hdimacreate