[New-bugs-announce] [issue6523] smtplib exception smtp.connect TypeError encode_plain

Leonard Kevin McGuire Jr report at bugs.python.org
Mon Jul 20 08:12:19 CEST 2009


New submission from Leonard Kevin McGuire Jr <kmcguire at kmcguire.org>:

------ 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

----------
components: Library (Lib), Unicode
messages: 90723
nosy: kmcguire
severity: normal
status: open
title: smtplib exception smtp.connect TypeError encode_plain
type: behavior
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6523>
_______________________________________


More information about the New-bugs-announce mailing list