Skip to content

Skip extraction of text from Outlook .msg files where the file extension is null or missing (e.g. SignedAttachment)#43

Merged
martinburchell merged 3 commits intomasterfrom
outlook-msg-fixups
Feb 9, 2026
Merged

Skip extraction of text from Outlook .msg files where the file extension is null or missing (e.g. SignedAttachment)#43
martinburchell merged 3 commits intomasterfrom
outlook-msg-fixups

Conversation

@martinburchell
Copy link
Collaborator

Fixes two related bugs discovered when extracting text from Outlook .msg attachments in the real world:

  • 'NoneType' object has no attribute 'replace'
  • 'SignedAttachment' object has no attribute 'extension'

These were because:

  • Not all Outlook .msg files have extension set.
  • Some have the extension set but it is null.

Currently we determine the types of these attachments by their file extensions so we can't really do anything with the text, but we can handle the errors more gracefully.

@martinburchell martinburchell merged commit 4a61661 into master Feb 9, 2026
6 checks passed
@martinburchell martinburchell deleted the outlook-msg-fixups branch February 9, 2026 15:53
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.

2 participants