fix(test): specify encoding=utf-8 reading BaseRobot.py/pyproject.toml#548
Merged
Merged
Conversation
….toml Windows' open() defaults to the locale codepage (cp1252), not UTF-8. BaseRobot.py's docstrings contain a stylized Unicode math italic pi (U+1D70B), so every open(path) without an explicit encoding here failed with UnicodeDecodeError on every Windows CI job -- this was breaking main itself, not just feature branches built on top of it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #548 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 137 137
Lines 13690 13434 -256
======================================
+ Misses 13690 13434 -256 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
mainitself is currently failing CI on every Windows job (confirmed viagh run list --branch main— latest run's conclusion isfailure), which was also failing identically on every one of fix(mobile): guard VehicleDriverBase against workspace=None #541-fix(models): make KinovaGen3 load via robot_descriptions, add XACRO_ARGS support #546 since they all inherit frommain.tests/test_backend_capabilities.pyopensBaseRobot.py(twice) andpyproject.tomlwith plainopen(path)— no encoding specified. Windows defaults to the locale codepage (cp1252) rather than UTF-8.BaseRobot.py's docstrings contain a stylized Unicode math italic "𝜋" (U+1D70B), which cp1252 can't decode →UnicodeDecodeErroron every Windows job, every PR.encoding="utf-8"to all threeopen()calls. Confirmed these were the only unencodedopen()calls intests/.test_IK_GN3numerical flakiness (tech-debt.md) — not touched by this PR.Test plan
pytest tests/test_backend_capabilities.py— 21 passed, 4 skippedencoding="utf-8") is correct on every platform regardless — it's the only way to guarantee the file (an actual UTF-8 source file) decodes correctly no matter the OS locale.🤖 Generated with Claude Code