Skip to content

BUG: fix error handling in StringDType to fixed-width bytes case - #32409

Merged
charris merged 1 commit into
numpy:mainfrom
ngoldbaum:fix-unicode-error
Aug 24, 2026
Merged

charris merged 1 commit into
numpy:mainfrom
ngoldbaum:fix-unicode-error

Conversation

@ngoldbaum

@ngoldbaum ngoldbaum commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

PR summary

There's already an active UnicodeDecodeError in this error branch, so setting another error is incorrect. UnicodeDecodeError also has five arguments, so this is malformed anyway.

AI Disclosure

An AI model spotted the bug.

@ngoldbaum ngoldbaum changed the title BUG: raise a normalizable error for invalid UTF-8 in the StringDType … BUG: fix error handling in StringDType to fixed-width bytes case Aug 24, 2026
@ngoldbaum ngoldbaum added the 09 - Backport-Candidate PRs tagged should be backported label Aug 24, 2026

@ikrommyd ikrommyd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I personally wouldn't have bothered writing a test. LGTM!

@charris
charris merged commit 832065d into numpy:main Aug 24, 2026
97 of 98 checks passed
@charris

charris commented Aug 24, 2026

Copy link
Copy Markdown
Member

Thanks Nathan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants