classification
Title: email/base64mime.py cannot work
Type: behavior Stage: resolved
Components: Versions: Python 3.0
process
Status: closed Resolution: duplicate
Dependencies: Superseder: smtplib is broken in Python3
View: 5259
Assigned To: Nosy List: ajaksu2, l5g
Priority: high Keywords: easy

Created on 2009-02-18 01:36 by l5g, last changed 2009-04-25 22:53 by ajaksu2. This issue is now closed.

Messages (2)
msg82400 - (view) Author: l5g (l5g) Date: 2009-02-18 01:36
When using smtplib to send mail, I meet this bug. Maybe the line
              """ enc = b2a_base64(s[i:i +
max_unencoded]).decode("ascii")""" 
should be changed to
               """ enc = b2a_base64((s[i:i +
max_unencoded]).encode()).decode("ascii")

File "/usr/local/lib/python3.0/smtplib.py", line 580, in login
    AUTH_PLAIN + " " + encode_plain(user, password))
  File "/usr/local/lib/python3.0/smtplib.py", line 545, in encode_plain
    return encode_base64("\0%s\0%s" % (user, password))
  File "/usr/local/lib/python3.0/email/base64mime.py", line 97, 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
msg86564 - (view) Author: Daniel Diniz (ajaksu2) (Python triager) Date: 2009-04-25 22:53
This is a duplicate of issue 5259.
History
Date User Action Args
2010-12-27 17:04:58r.david.murrayunlinkissue1685453 dependencies
2009-04-25 22:53:46ajaksu2setstatus: open -> closed

superseder: smtplib is broken in Python3

nosy: + ajaksu2
messages: + msg86564
resolution: duplicate
stage: test needed -> resolved
2009-04-22 14:40:20ajaksu2setpriority: high
keywords: + easy
type: compile error -> behavior
stage: test needed
2009-04-22 14:40:11ajaksu2linkissue5259 dependencies
2009-03-31 06:05:27ocean-citylinkissue1685453 dependencies
2009-02-18 01:36:05l5gcreate