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

Feature Request: Add support for Task objects #212

Closed
1 of 2 tasks
micheben opened this issue Sep 16, 2021 · 7 comments
Closed
1 of 2 tasks

Feature Request: Add support for Task objects #212

micheben opened this issue Sep 16, 2021 · 7 comments
Labels
Accepted This feature request has been accepted and will be developed Complete This feature has been fully implemented. enhancement

Comments

@micheben
Copy link

Bug Metadata

  • Version of extract_msg: 0.28.7
  • Your python version: Python 3.7
  • How did you launch extract_msg?
    • My command line or
    • I used the extract_msg package

Describe the bug
Files with a Outlook Task attachment fail with an extract_msg.exceptions.UnrecognizedMSGTypeError

What code did you use or can we use to reproduce this error?

from extract_msg import Message
b = open("ipmtask.msg","rb").read()
msg = Message(path=b)

Is there a message.msg file you want to share to help us reproduce this?
ipmtask.msg.zip

@TheElementalOfDestruction TheElementalOfDestruction changed the title extract_msg.exceptions.UnrecognizedMSGTypeError "IPM.Task" Feature Request: Add support for Task objects. Sep 16, 2021
@TheElementalOfDestruction TheElementalOfDestruction changed the title Feature Request: Add support for Task objects. Feature Request: Add support for Task objects Sep 16, 2021
@TheElementalOfDestruction
Copy link
Collaborator

Changed from a bug report to Feature request (not a bug that it is not supported yet). Will get around to this at some point.

@TheElementalOfDestruction
Copy link
Collaborator

On a related note, you should try to avoid directly instantiating the Message class. Prefer using extract_msg.openMsg to ensure you get the correct class for your .msg file.

@micheben
Copy link
Author

Changed from a bug report to Feature request (not a bug that it is not supported yet). Will get around to this at some point.

Thought it might be forgotten, since it was instantiated as BrokenAttachment and not as UnsupportedAttachment.

On a related note, you should try to avoid directly instantiating the Message class. Prefer using extract_msg.openMsg to ensure you get the correct class for your .msg file.

Thanks for the note.

@TheElementalOfDestruction
Copy link
Collaborator

So "BrokenAttachment" is just a substitute for an attachment that had an error in loading while UnsupportedAttachment refers to an attachment type that just can't be supported at all (it's a very specific type that we check for). It was specifically the UnrecognizedMSGType error that should have given it away, however it's also not as clear as it could be. I'll add some changes to openMsg (which Attachment uses internally) that should make it more noticeable that we know the msg type exists but is just not supported. Will probably add another attachment type to also make it clear that it was specifically an unsupported msg type.

In the future I'll actually get around to adding it, just need to finish the next major version, then move to a version that will drop support for Python 2 so we can add more features. Will probably be added after that one.

@TheElementalOfDestruction
Copy link
Collaborator

By the way, any additional examples you can produce would help to make sure that we get everything you may want to access when you get an instance of the Task class (which is what you would get when that format is opened by the module). Also, any examples on how you would expect it to get saved would also be beneficial, with images or possibly actual files being the best.

@TheElementalOfDestruction TheElementalOfDestruction added In Progress This issue or feature request has been confirmed or approved, respectively, and is being worked on. Accepted This feature request has been accepted and will be developed labels Jun 8, 2022
@TheElementalOfDestruction
Copy link
Collaborator

Support for viewing many of the important task properties and opening task objects has been finished. Support for saving them will come later

@TheElementalOfDestruction
Copy link
Collaborator

Completed in 0.35.0. Let me know if you have any issues with it.

@TheElementalOfDestruction TheElementalOfDestruction added Complete This feature has been fully implemented. and removed In Progress This issue or feature request has been confirmed or approved, respectively, and is being worked on. labels Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted This feature request has been accepted and will be developed Complete This feature has been fully implemented. enhancement
Projects
None yet
Development

No branches or pull requests

2 participants