pyocd / pyocd/pyOCD

UnicodeDecodeError ('gbk' codec) when running pyocd flash on Windows

Open
#1,883 0 comments 0 reactions 0 assignees View on GitHub

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]

Image

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.

Image Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.