fix: stop fixed-width string decoding at first NUL - #220
Open
SaiDeepikaKuchibhotla wants to merge 4 commits into
Open
fix: stop fixed-width string decoding at first NUL#220SaiDeepikaKuchibhotla wants to merge 4 commits into
SaiDeepikaKuchibhotla wants to merge 4 commits into
Conversation
SaiDeepikaKuchibhotla
requested review from
amccann-Tek,
nfelt14,
pradhansk,
tekperson and
v12ganesh
September 7, 2026 14:26
SaiDeepikaKuchibhotla
deployed
to
package-build
September 7, 2026 14:26 — with
GitHub Actions
Active
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #220 +/- ##
=======================================
Coverage 82.91% 82.91%
=======================================
Files 33 33
Lines 2763 2763
Branches 359 359
=======================================
Hits 2291 2291
Misses 337 337
Partials 135 135 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
SaiDeepikaKuchibhotla
deployed
to
package-build
September 7, 2026 14:30 — with
GitHub Actions
Active
SaiDeepikaKuchibhotla
deployed
to
package-build
September 7, 2026 14:52 — with
GitHub Actions
Active
nfelt14
requested changes
Sep 8, 2026
| {python = ">=3.13", version = "^2.1"}, | ||
| ] | ||
| pip = "^26.0" | ||
| pip = ">=26.2.0,<27.0.0" |
Collaborator
There was a problem hiding this comment.
Why did you need to change this?
SaiDeepikaKuchibhotla
deployed
to
package-build
September 8, 2026 18:35 — with
GitHub Actions
Active
nfelt14
approved these changes
Sep 8, 2026
Test Results (ubuntu)
tests/test_fastframe_analog_waveform.py('/home/runner/work/tm_data_types/tm_data_types/tests/test_fastframe_analog_waveform.py', 73, 'Skipped: Corpus file missing: /home/runner/work/tm_data_types/tm_data_types/archive/test_wfms/FastFrame_waveforms/FF5MhzX100From5Series.wfm')('/home/runner/work/tm_data_types/tm_data_types/tests/test_fastframe_analog_waveform.py', 73, 'Skipped: Corpus file missing: /home/runner/work/tm_data_types/tm_data_types/archive/test_wfms/FastFrame_waveforms/FF1MX5005Series.wfm')('/home/runner/work/tm_data_types/tm_data_types/tests/test_fastframe_analog_waveform.py', 73, 'Skipped: Corpus file missing: /home/runner/work/tm_data_types/tm_data_types/archive/test_wfms/FastFrame_waveforms/FF1MX1095Series.wfm')tests/test_tm_data_types.py('/home/runner/work/tm_data_types/tm_data_types/tests/test_tm_data_types.py', 549, 'Skipped: Skipping 1G test in GitHub Actions environment')tests/test_tss_reader.py('/home/runner/work/tm_data_types/tm_data_types/tests/test_tss_reader.py', 16, 'Skipped: TSS fixture missing')('/home/runner/work/tm_data_types/tm_data_types/tests/test_tss_reader.py', 25, 'Skipped: TSS fixture missing')('/home/runner/work/tm_data_types/tm_data_types/tests/test_tss_reader.py', 35, 'Skipped: TSS fixture missing') |
Test Results (windows)
tests\test_fastframe_analog_waveform.py('D:\\a\\tm_data_types\\tm_data_types\\tests\\test_fastframe_analog_waveform.py', 73, 'Skipped: Corpus file missing: D:\\a\\tm_data_types\\tm_data_types\\archive\\test_wfms\\FastFrame_waveforms\\FF5MhzX100From5Series.wfm')('D:\\a\\tm_data_types\\tm_data_types\\tests\\test_fastframe_analog_waveform.py', 73, 'Skipped: Corpus file missing: D:\\a\\tm_data_types\\tm_data_types\\archive\\test_wfms\\FastFrame_waveforms\\FF1MX5005Series.wfm')('D:\\a\\tm_data_types\\tm_data_types\\tests\\test_fastframe_analog_waveform.py', 73, 'Skipped: Corpus file missing: D:\\a\\tm_data_types\\tm_data_types\\archive\\test_wfms\\FastFrame_waveforms\\FF1MX1095Series.wfm')tests\test_tm_data_types.py('D:\\a\\tm_data_types\\tm_data_types\\tests\\test_tm_data_types.py', 549, 'Skipped: Skipping 1G test in GitHub Actions environment')tests\test_tss_reader.py('D:\\a\\tm_data_types\\tm_data_types\\tests\\test_tss_reader.py', 16, 'Skipped: TSS fixture missing')('D:\\a\\tm_data_types\\tm_data_types\\tests\\test_tss_reader.py', 25, 'Skipped: TSS fixture missing')('D:\\a\\tm_data_types\\tm_data_types\\tests\\test_tss_reader.py', 35, 'Skipped: TSS fixture missing') |
Test Results (macos)
tests/test_fastframe_analog_waveform.py('/Users/runner/work/tm_data_types/tm_data_types/tests/test_fastframe_analog_waveform.py', 73, 'Skipped: Corpus file missing: /Users/runner/work/tm_data_types/tm_data_types/archive/test_wfms/FastFrame_waveforms/FF5MhzX100From5Series.wfm')('/Users/runner/work/tm_data_types/tm_data_types/tests/test_fastframe_analog_waveform.py', 73, 'Skipped: Corpus file missing: /Users/runner/work/tm_data_types/tm_data_types/archive/test_wfms/FastFrame_waveforms/FF1MX5005Series.wfm')('/Users/runner/work/tm_data_types/tm_data_types/tests/test_fastframe_analog_waveform.py', 73, 'Skipped: Corpus file missing: /Users/runner/work/tm_data_types/tm_data_types/archive/test_wfms/FastFrame_waveforms/FF1MX1095Series.wfm')tests/test_tm_data_types.py('/Users/runner/work/tm_data_types/tm_data_types/tests/test_tm_data_types.py', 549, 'Skipped: Skipping 1G test in GitHub Actions environment')tests/test_tss_reader.py('/Users/runner/work/tm_data_types/tm_data_types/tests/test_tss_reader.py', 16, 'Skipped: TSS fixture missing')('/Users/runner/work/tm_data_types/tm_data_types/tests/test_tss_reader.py', 25, 'Skipped: TSS fixture missing')('/Users/runner/work/tm_data_types/tm_data_types/tests/test_tss_reader.py', 35, 'Skipped: TSS fixture missing') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Description
Fixes an issue where converting WFM waveform data to CSV could raise a
UnicodeDecodeErrorwhen fixed-width axis-unit fields contained non-UTF-8 padding bytes after a valid null terminator. This can occur with WFM files generated by a Tektronix DPO71254C.For example, the axis-unit fields may contain:
sfollowed by a null terminator and non-UTF-8 padding bytesVfollowed by a null terminator and non-UTF-8 padding bytesPreviously,
String.__str__()decoded the entire fixed-width byte field before removing trailing null characters:self.decode("utf_8").rstrip("\x00")
Addresses #211
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Addresses #<issue_number>