Fix Python UnicodeDecodeError with os.listdir - Git index.lock File Exists Even After Deleting: Fixes-How to Fix Git Merge Conflicts in Binary Files

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