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

Deal_with_drafts #136

Open
ghost opened this issue Apr 13, 2022 · 1 comment
Open

Deal_with_drafts #136

ghost opened this issue Apr 13, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 13, 2022

Hey !

We found an error during our utilisation of Melusine.

When we use the function get_emails() to load the emails, it will raise an error if it encounters a draft.
image

Some drafts have no sender or datetime_sent attributes, so it will raise an error in the function _extract_email_attributes().

I will join a PR with the solution we proposed to deal with drafts in the file tree.
For each email, we look if it has a datetime_sent and sender attributes. If it's not the case, we replace these attributes by None values.
image

If you have other ideas to deal with this issue, we are listening !

We already told the users of the mailbox to delete drafts in the file tree or move them in the folder "Brouillon".
But It may be safer to have a way to deal with a draft forgotten in the file tree, instead of having our script for the training of the DL model (which can be long) failed because of one draft.

Best regards,

Maxime

Python version : 3.9.7

Melusine version : 2.3.4

Operating System : Windows

@TFA-MAIF
Copy link
Contributor

Hello,

Thank you for both issues and PR associated. We will take a look at it and plan integration :)

Best regards

hugo-quantmetry added a commit that referenced this issue Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant