Skip to content

Fix for undetectable encodings (#10884)#10905

Merged
ea-rus merged 14 commits into
mindsdb:releases/25.11.1from
trickster026:bugfix/undetectable-encodingg
Nov 28, 2025
Merged

Fix for undetectable encodings (#10884)#10905
ea-rus merged 14 commits into
mindsdb:releases/25.11.1from
trickster026:bugfix/undetectable-encodingg

Conversation

@trickster026
Copy link
Copy Markdown
Contributor

Description

Fixes an issue where the email handler would fail when processing emails with undetectable character encodings. The error occurred when chardet.detect() returned None for the encoding, causing a NoneType error.

Fixes #10884

Type of change

  • 🐛 Bug fix (non-breaking change which fixes an issue)

Verification Process

To ensure the changes are working as expected:

  • Test Location: [tests/unused/unit/handler_tests/test_email_handler.py]
  • Verification Steps:
    1. Run the test suite: pytest tests/unused/unit/handler_tests/test_email_handler.py::TestEmailHandler::test_undetectable_encoding_handling -v
    2. The test verifies that:
      • Emails with undetectable encodings are processed without raising exceptions
      • The result contains all expected fields
      • The handler gracefully handles binary content in email bodies

Checklist:

  • My code follows the style guidelines(PEP 8) of MindsDB.
  • I have appropriately commented on my code, especially in complex areas.
  • Necessary documentation updates are either made or tracked in issues.
  • Relevant unit and integration tests are updated or added.

ZoranPandovski
ZoranPandovski previously approved these changes May 27, 2025
Copy link
Copy Markdown
Member

@ZoranPandovski ZoranPandovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@trickster026
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@martyna-mindsdb
Copy link
Copy Markdown
Contributor

@hamishfagg
Can you please approve the deployment of this PR?

@martyna-mindsdb
Copy link
Copy Markdown
Contributor

@martyna-mindsdb
Copy link
Copy Markdown
Contributor

@ZoranPandovski
Can you please review/approve? Thanks.

@trickster026
Copy link
Copy Markdown
Contributor Author

Any update on merging this PR @martyna-mindsdb?

ZoranPandovski
ZoranPandovski previously approved these changes Nov 10, 2025
@ZoranPandovski ZoranPandovski changed the base branch from main to develop November 10, 2025 15:34
@ZoranPandovski ZoranPandovski dismissed their stale review November 10, 2025 15:34

The base branch was changed.

@ZoranPandovski ZoranPandovski requested a review from a team as a code owner November 10, 2025 15:34
@ZoranPandovski ZoranPandovski changed the base branch from develop to main November 10, 2025 15:35
Copy link
Copy Markdown
Member

@ZoranPandovski ZoranPandovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @trickster026 , thanks this is ready to be merged but you need to point to develop instead of main branch. Can you please do that?

@ea-rus ea-rus changed the base branch from main to releases/v26.0.0 November 13, 2025 11:41
@ea-rus ea-rus changed the base branch from releases/v26.0.0 to releases/25.11.1 November 27, 2025 16:57
@ea-rus ea-rus merged commit 65aabef into mindsdb:releases/25.11.1 Nov 28, 2025
31 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Email handler trying to read encoding but it is None

5 participants