Skip to content

Update STDR.py#78

Open
mcninch wants to merge 1 commit intoSemi-ATE:mainfrom
mcninch:patch-1
Open

Update STDR.py#78
mcninch wants to merge 1 commit intoSemi-ATE:mainfrom
mcninch:patch-1

Conversation

@mcninch
Copy link

@mcninch mcninch commented Dec 9, 2025

Fixes #77 where invalid UTF-8 characters existing in the STDF DTR records cause UnicodeDecodeError to be thrown when bytearray.decode() is called.

image

Description of Changes

Changed the default error handler of bytearray.decode() from 'strict' to 'replace' in order to handle invalid utf-8 characters that may exist in STDF records

image

Issue(s) Resolved

Fixes #77
Fixes #54

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct:

Invalid UTF-8 characters existing in the STDF cause UnicodeDecodeError to be thrown when .decode() is called.

Exception has occurred: UnicodeDecodeError
'utf-8' codec can't decode byte 0x96 in position 57: invalid start byte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant