-
Notifications
You must be signed in to change notification settings - Fork 1
bug: install_tools.py Unicode checkmark fails on Windows cp1252 #328
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingneeds-triageNeeds review and prioritizationNeeds review and prioritization
Description
Bug Description
The install_tool() function in tools/doit/install_tools.py uses \u2713 (checkmark) in print statements. On Windows CI, doit's output stream uses cp1252 encoding which cannot encode this character, causing a UnicodeEncodeError.
Steps to Reproduce
- Run
doit install_toolsordoit install_direnvon Windows CI (e.g. GitHub Actionswindows-latest) - The tool installs successfully but crashes when printing the success message
Expected vs Actual Behavior
Expected: Success message prints on all platforms
Actual:
UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 0: character maps to <undefined>
Stack trace from CI:
File "tools/doit/install_tools.py", line 263, in _install_age
print("\u2713 age installed.")
File ".venv/Lib/site-packages/doit/action.py", line 359, in write
stream.write(text)
File "C:\...\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError
Proposed Fix
Replace Unicode checkmarks with ASCII equivalents. See endavis/pynetappfoundry#459 for the fix applied downstream.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds-triageNeeds review and prioritizationNeeds review and prioritization