故障排查¶
This page is the canonical symptom → fix guide.
For installation steps, see Installation.
For exact MCP client syntax, see Configuration Guide.
For a first-run workflow, see Quick Start.
MCP Connection Problems¶
Tools not showing in the client¶
Confirm you used the correct config file for your client.
Confirm the Python path is an absolute path from
which python.Check the config file for JSON/TOML syntax errors.
Restart the client after configuration changes.
Test the server directly:
python -m chatspatial server --help
If you need the exact config file format, go back to the Configuration Guide.
"python not found" or "module not found"¶
Make sure ChatSpatial is installed inside the environment you configured
Re-run
which pythoninside the activated environmentUpdate the MCP config to use that exact path
Docker / GHCR Problems¶
docker: command not found¶
Install Docker Desktop or Docker Engine, confirm docker --version works, then restart your MCP client.
Pull fails for the GHCR image¶
Check the image name and network access:
docker pull ghcr.io/cafferychen777/chatspatial:latest
MCP tools do not appear when using Docker¶
Use
--rm -i, not-it, in MCP stdio configurationUse absolute host paths in
-vmountsRestart the MCP client after changing configuration
Dataset not found in Docker¶
Mount the host data directory and use the container path in prompts:
-v /Users/alice/spatial-data:/data:ro
Load /data/sample.h5ad
Do not prompt with /Users/alice/spatial-data/sample.h5ad; that path exists on the host, not inside the container.
Permission denied on mounted outputs¶
Confirm the host output directory exists and Docker has permission to write there. On Docker Desktop, also check file-sharing permissions for the mounted parent directory.
Data Loading Problems¶
“未找到数据集”¶
Use an absolute path:
❌ ~/data/sample.h5ad
❌ ./data/sample.h5ad
✅ /Users/yourname/data/sample.h5ad
文件格式无法识别¶
H5AD: verify with
python -c "import scanpy as sc; sc.read_h5ad('file.h5ad')"Visium: point to the directory containing the
spatial/folderHDF5 check:
file yourdata.h5ad
Analysis Problems¶
“请先运行预处理”¶
Most analyses require preprocessing first.
Preprocess the data
“没有显著结果”¶
check data quality (>500 spots, >1000 genes)
lower significance thresholds
try a different analysis method
细胞通讯分析失败¶
Use species/resource pairs that match the dataset:
For mouse: species="mouse", liana_resource="mouseconsensus"
For human: species="human", liana_resource="consensus"
Resource Problems¶
系统卡死 / MemoryError¶
subsample data for testing
reduce batch sizes
monitor memory with
topuse 32GB+ RAM or cloud resources for large datasets
CUDA 显存不足¶
set
use_gpu=Falsereduce batch size
clear cached GPU memory if your workflow allows it
Quick Fix Table¶
问题 |
First fix |
|---|---|
导入错误 |
Reinstall with |
|
Use |
Client not connecting |
Re-check config and restart the client |
Docker pull fails |
Run |
Docker dataset not found |
Mount the host data directory and prompt with |
路径错误 |
使用绝对路径 |
Analysis fails immediately |
先运行预处理 |
R 方法失败 |
Install R and the required R packages |
Still Stuck?¶
FAQ — short answers and pointers
Configuration Guide — exact client syntax
Methods Reference — tool parameters and defaults
GitHub Issues — report reproducible bugs