graphify icon indicating copy to clipboard operation
graphify copied to clipboard

UnicodeDecodeError on Windows (GBK locale) during graphify install

Open Will-hxw opened this issue 7 months ago • 1 comments

Bug Description

Running graphify install on Windows with GBK default encoding fails with UnicodeDecodeError.

Steps to Reproduce

  1. pip install graphifyy
  2. graphify install
  3. Crash: UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 44

Root Cause

All 16 read_text()/write_text() calls in graphify/__main__.py omit the encoding parameter. Windows GBK locale defaults to GBK instead of UTF-8.

Proposed Fix

Add encoding="utf-8" to every read_text() and write_text() call. PR already prepared: https://github.com/Will-hxw/graphify/pull/1

Will-hxw avatar Apr 07 '26 10:04 Will-hxw

Fixed in v0.3.4. All 16 read_text() and write_text() calls in __main__.py now pass encoding="utf-8" explicitly. Windows GBK/ANSI locales will no longer crash on graphify install.

pip install --upgrade graphifyy

safishamsi avatar Apr 07 '26 10:04 safishamsi