UnicodeDecodeError ('gbk' codec) when running pyocd flash on Windows
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 560
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 3
Description
When I run the command pyocd flash -t stm32h743xx build/Debug/STM32H743IIT6.elf, I get the following error: 0000709 C 'gbk' codec can't decode byte 0xb0 in position 122: illegal multibyte sequence [main]
However, I discovered that enabling "Beta: Use Unicode UTF-8 for worldwide language support" in the Windows Region settings resolves the issue completely, and the flash command works as expected.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce pyocd flash -t stm32h743xx build/Debug/STM32H743IIT6.elf on Windows with the reported GBK locale and trace where the command decodes output. Done means flashing works without enabling Windows UTF-8 worldwide language support, with coverage for the reported non-UTF-8 environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100