classification
Title: smtplib exception smtp.connect TypeError encode_plain
Type: behavior Stage: resolved
Components: Library (Lib), Unicode Versions: Python 3.0
process
Status: closed Resolution: duplicate
Dependencies: Superseder: smtplib is broken in Python3
View: 5259
Assigned To: Nosy List: kmcguire
Priority: normal Keywords:

Created on 2009-07-20 06:12 by kmcguire, last changed 2010-01-09 17:28 by r.david.murray. This issue is now closed.

Messages (1)
msg90723 - (view) Author: Leonard Kevin McGuire Jr (kmcguire) Date: 2009-07-20 06:12
------ SYSTEM INFORMATION -----
module:     smtplib
system:     linux

python3.0 -V 
  Python 3.0.1+

----- TEST CASE PYTHON SOURCE -----
import smtplib
smtp = smtplib.SMTP()
smtp.connect('mail.myserver.org')
smtp.login('myusername', 'mypassword')

----- TEST CASE EXECUTION RESULTS -----
python3.0 testcase.py 
Traceback (most recent call last):
  File "testcase.py", line 4, in <module>
    smtp.login('myusername', 'mypassword')
  File "/home/kevin/Projects/ftpwatch/smtplib.py", line 580, in login
    AUTH_PLAIN + " " + encode_plain(user, password))
  File "/home/kevin/Projects/ftpwatch/smtplib.py", line 545, in encode_plain
    return encode_base64("\0%s\0%s" % (user, password))
  File "/usr/lib/python3.0/email/base64mime.py", line 96, in body_encode
    enc = b2a_base64(s[i:i + max_unencoded]).decode("ascii")
TypeError: b2a_base64() argument 1 must be bytes or buffer, not str
History
Date User Action Args
2010-01-09 17:28:58r.david.murraysetstatus: open -> closed
priority: normal
superseder: smtplib is broken in Python3
resolution: duplicate
stage: resolved
2009-07-20 06:12:17kmcguirecreate