Fix Python UnicodeDecodeError: Bytes to String - Python UnicodeDecodeError: 'charmap' Codec Can't Decode Byte-Git Detached HEAD: How to Safely Use Reset --hard

Result check
- Keep one change per test run so you know which step helped.
- Undo temporary changes after the issue is confirmed.