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 module example email-unpack.py error #45614

Closed
esv mannequin opened this issue Oct 12, 2007 · 2 comments
Closed

email module example email-unpack.py error #45614

esv mannequin opened this issue Oct 12, 2007 · 2 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@esv
Copy link
Mannequin

esv mannequin commented Oct 12, 2007

BPO 1273
Nosy @birkenfeld

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 2007-11-24.11:24:26.390>
created_at = <Date 2007-10-12.16:03:18.912>
labels = ['type-bug', 'docs']
title = 'email module example email-unpack.py error'
updated_at = <Date 2007-11-24.11:24:26.389>
user = 'https://bugs.python.org/esv'

bugs.python.org fields:

activity = <Date 2007-11-24.11:24:26.389>
actor = 'georg.brandl'
assignee = 'none'
closed = True
closed_date = <Date 2007-11-24.11:24:26.390>
closer = 'georg.brandl'
components = ['Documentation']
creation = <Date 2007-10-12.16:03:18.912>
creator = 'esv'
dependencies = []
files = []
hgrepos = []
issue_num = 1273
keywords = []
message_count = 2.0
messages = ['56376', '57800']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'esv']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue1273'
versions = ['Python 2.5']

@esv
Copy link
Mannequin Author

esv mannequin commented Oct 12, 2007

In the email module example, email-unpack.py
(http://docs.python.org/lib/email-unpack.txt), line 56 throws an
AttributeError. It is currently

    ext = mimetypes.guess_extension(part.get_type())

I think this line should be

    ext = mimetypes.guess_extension(part.get_content_type())

The Message documentation
(http://docs.python.org/lib/module-email.message.html) mentions that
"Changed in version 2.5: The previously deprecated methods get_type(),
get_main_type(), and get_subtype() were removed."

@esv esv mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Oct 12, 2007
@birkenfeld
Copy link
Member

Thanks, this is fixed in the development docs now (r58445).

@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
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant