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

Improve file handling robustness #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Timon-Schneider
Copy link

Today I tried to process about 70,000 eml files and some errors occurred that I was able to fix for myself. I could not find any more errors with my files and wanted to share the code. Maybe it will help someone else.

Add UTF-8 encoding and add error handling.
Handle invalid character (backslash) in the path.
Attachment can be None, code now handles this case properly.
filename can contain invalid characters and can be split into multiple parts using filename* parameters, code now handles this case properly.
parent directory sometimes doesn't exist before trying to save the file, code now has proper directory creation handling.

Add UTF-8 encoding and add error handling.
Handle invalid character (backslash) in the path.
Attachment can be None, code now handles this case properly.
filename can contain invalid characters and can be split into multiple parts using filename* parameters, code now handles this case properly.
parent directory sometimes doesn't exist before trying to save the file, code now has proper directory creation handling.
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

Successfully merging this pull request may close these issues.

1 participant