Title: Windows: slim uvx cocoindex-code@latest install starts a stale daemon without embeddings; search output can also crash on GBK consoles
Repo: cocoindex-io/cocoindex-code
Version: cocoindex-code 0.2.33
OS: Windows
Summary
There are two separate problems:
- A slim
uvx cocoindex-code@latest install can start a daemon that lacks sentence_transformers, and later runs keep reconnecting to that stale daemon even after the dependency is added.
ccc search can crash on Windows consoles that use GBK when a result contains Unicode characters not encodable in that code page.
What I ran
First attempt:
uvx --prerelease=explicit --with cocoindex>=1.0.0a16 cocoindex-code@latest index
Observed:
Indexing failed: No module named 'sentence_transformers'
Then I retried with the missing dependency:
uvx --prerelease=explicit --with cocoindex>=1.0.0a16 --with sentence-transformers cocoindex-code@latest index
Observed:
Indexing failed: No module named 'sentence_transformers'
The dependency was actually present in the environment. These checks succeeded:
uv run --with sentence-transformers python -c "import sentence_transformers; print(sentence_transformers.__file__)"
uv run --with cocoindex-code --with sentence-transformers python -c "from cocoindex.ops.sentence_transformers import SentenceTransformerEmbedder; print(SentenceTransformerEmbedder)"
Root cause I found locally
- The first failed run had already started a daemon.
- Later runs kept reconnecting to that stale daemon.
- Stopping the daemon and rerunning in a correct environment fixed indexing.
Commands:
uv run --with cocoindex-code --with sentence-transformers python -m cocoindex_code.cli daemon stop
uv run --with cocoindex-code --with sentence-transformers python -m cocoindex_code.cli index
After stopping the stale daemon, indexing succeeded.
Recommended fix
- If embeddings are required, fail earlier with a direct install hint that points users to the supported
cocoindex-code[full] install path.
- Consider including dependency/environment fingerprinting in the daemon handshake so a client does not reconnect to an incompatible stale daemon.
- If a required module is missing in the daemon, surface that as a daemon health error and suggest
ccc daemon restart after install.
Second issue: Windows console encoding crash
After indexing succeeded, search returned results but then crashed while printing:
uv run --with cocoindex-code --with sentence-transformers python -m cocoindex_code.cli search obsidian --limit 3
Observed traceback tail:
UnicodeEncodeError: 'gbk' codec can't encode character '\u2194' in position 523: illegal multibyte sequence
Recommended fix
- Emit UTF-8 safely on Windows, or
- catch
UnicodeEncodeError in result printing and fall back to replacement characters.
Notes
- Installing the supported full tool worked cleanly:
uv tool install --upgrade "cocoindex-code[full]"
ccc index
ccc mcp
- Once the full tool was installed, indexing worked on local projects and a Markdown notes directory.
Title: Windows: slim
uvx cocoindex-code@latestinstall starts a stale daemon without embeddings; search output can also crash on GBK consolesRepo:
cocoindex-io/cocoindex-codeVersion:
cocoindex-code 0.2.33OS: Windows
Summary
There are two separate problems:
uvx cocoindex-code@latestinstall can start a daemon that lackssentence_transformers, and later runs keep reconnecting to that stale daemon even after the dependency is added.ccc searchcan crash on Windows consoles that useGBKwhen a result contains Unicode characters not encodable in that code page.What I ran
First attempt:
Observed:
Then I retried with the missing dependency:
Observed:
The dependency was actually present in the environment. These checks succeeded:
Root cause I found locally
Commands:
After stopping the stale daemon, indexing succeeded.
Recommended fix
cocoindex-code[full]install path.ccc daemon restartafter install.Second issue: Windows console encoding crash
After indexing succeeded,
searchreturned results but then crashed while printing:Observed traceback tail:
Recommended fix
UnicodeEncodeErrorin result printing and fall back to replacement characters.Notes