-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Common errors and how to fix them. If you hit something not listed here, please open an issue.
Symptom: matplotlib 3.3+ rejects the color array shape that TissueSection.visualize() (or the GUI's 3D viewer) passes to Axes3D.plot_surface.
Cause: older calling code passed a single RGBA tuple where matplotlib now wants an (N, M, 4)-shaped facecolors array matching the surface mesh.
Fix: the package builds the color array with np.tile(color, x.shape + (1,)) so the dtype/shape match matplotlib's expectation. If you maintain a fork and see this error, ensure the surface-plotting block uses that pattern (or upgrade to v0.1.0+). Reference: the maintainer note bundled under docs/notes/plot-surface-bug.md in the source tree.
Symptom: Claude Desktop starts but the tissue-simulator MCP tools aren't available; logs show "transport error" or "command not found".
Causes and fixes:
-
Relative path in
claude_desktop_config.json. Always use absolute paths for both the Python interpreter and the script. The example config in docs/guides/mcp.md uses absolute paths intentionally. -
mcppackage not installed. It's an optional extra:pip install -e ".[mcp]". -
Wrong Python interpreter selected. If you use a venv or conda env, point the config's
commandat that interpreter (e.g./Users/you/miniforge3/envs/tissues/bin/python), not the system one. - Stale tool cache in Claude Desktop. Quit and relaunch the app after editing the config — it doesn't hot-reload.
NetworkX is required for those three subsystems but not for basic tissue generation. Install via:
pip install networkx
# or pull it in with the dev / mcp extras: pip install -e ".[mcp]"The package guards each subsystem with a NETWORKX_AVAILABLE flag and warns on import when it's missing.
The RSA packer stops after max_attempts consecutive failed placements. Returning 0 means it couldn't fit a single cell, which is almost always one of:
-
max_attemptstoo low for the radius mix. Default is 1000. For larger tissues or tightermin_spacing, raise to 5000–20000. -
Cell radii larger than (or comparable to) the tissue dimensions. Confirm
cell_radiiis in micrometers and consistent withheight/width/thickness. -
allow_boundary_cells=Falsewith a small tissue. Cells must fit entirely inside the bounds — combined withmin_spacing, this can shut out large cells. Tryallow_boundary_cells=True. -
min_spacingtoo large. It's a surface-to-surface gap;min_spacing=10.0on cells of radius 5 effectively reserves a 30µm exclusion zone per cell.
Symptom: ReplicateStatistics.divergence_score is nan for replicates that look fine visually.
Cause: nan means the JS-divergence comparison had no signal to compare — typically because the target's interaction set is empty. This commonly happens when network_mode="contact" is used on a packed tissue: packing uses min_spacing > 0 so surface contacts are rare and the contact-mode network is empty.
Fix: use network_mode="radius" with an explicit network_radius (e.g. 20.0) for both the target-stats extraction and the ReplicateGenerator constructor. This matches what the existing tests do. See the v0.1.2 changelog entry for the nan-on-no-signal semantics.