code-context-engine icon indicating copy to clipboard operation
code-context-engine copied to clipboard

copilot init error

Open ITFinesse opened this issue 5 months ago • 1 comments

What happened?

Image

What did you expect?

no error

Steps to reproduce

cce init --agent copilot

Relevant logs or error output


Python version

3.14.5

OS

win 11

CCE version

0.4.22

ITFinesse avatar Jun 11 '26 14:06 ITFinesse

Fixed in PR #110. The crash was caused by Path.read_text() defaulting to the system encoding on Windows (cp1252 instead of UTF-8). When any config or instruction file contained non-ASCII bytes (byte 0x80 in your case), Python's charmap codec failed.

The fix adds encoding="utf-8" to every read_text() and write_text() call across the codebase (13 files, 69 call sites). This covers cce init, cce serve, editor config reads/writes, hook installation, and all other file I/O paths.

Will be in the next release. If you want to verify before then, you can install from the branch:

pip install git+https://github.com/elara-labs/code-context-engine.git@fix/windows-encoding-read-text

rajkumarsakthivel avatar Jun 16 '26 19:06 rajkumarsakthivel