Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

email/base64mime.py cannot work #49554

Closed
l5g mannequin opened this issue Feb 18, 2009 · 2 comments
Closed

email/base64mime.py cannot work #49554

l5g mannequin opened this issue Feb 18, 2009 · 2 comments
Labels
easy type-bug An unexpected behavior, bug, or error

Comments

@l5g
Copy link
Mannequin

l5g mannequin commented Feb 18, 2009

BPO 5304
Nosy @devdanzin
Superseder
  • bpo-5259: smtplib is broken in Python3
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2009-04-25.22:53:46.020>
    created_at = <Date 2009-02-18.01:36:05.878>
    labels = ['easy', 'type-bug']
    title = 'email/base64mime.py cannot work'
    updated_at = <Date 2009-04-25.22:53:46.018>
    user = 'https://bugs.python.org/l5g'

    bugs.python.org fields:

    activity = <Date 2009-04-25.22:53:46.018>
    actor = 'ajaksu2'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-04-25.22:53:46.020>
    closer = 'ajaksu2'
    components = []
    creation = <Date 2009-02-18.01:36:05.878>
    creator = 'l5g'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 5304
    keywords = ['easy']
    message_count = 2.0
    messages = ['82400', '86564']
    nosy_count = 2.0
    nosy_names = ['ajaksu2', 'l5g']
    pr_nums = []
    priority = 'high'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '5259'
    type = 'behavior'
    url = 'https://bugs.python.org/issue5304'
    versions = ['Python 3.0']

    @l5g
    Copy link
    Mannequin Author

    l5g mannequin commented Feb 18, 2009

    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

    @l5g l5g mannequin added the build The build process and cross-build label Feb 18, 2009
    @devdanzin devdanzin mannequin added easy type-bug An unexpected behavior, bug, or error and removed build The build process and cross-build labels Apr 22, 2009
    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Apr 25, 2009

    This is a duplicate of bpo-5259.

    @devdanzin devdanzin mannequin closed this as completed Apr 25, 2009
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    easy type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants