Troubleshooting¶
Solutions to common problems when using Code Scalpel.
Quick Diagnostics¶
Run diagnostics to identify issues:
This checks: - Installation integrity - License status - Configuration validity - Connectivity (for MCP)
Installation Issues¶
"command not found: code-scalpel"¶
Cause: Code Scalpel not in PATH.
Solutions:
"ModuleNotFoundError: No module named 'code_scalpel'"¶
Cause: Package not installed in current environment.
Solution:
# Check which Python
which python
# Install in correct environment
python -m pip install codescalpel
# Verify
python -c "import code_scalpel; print(code_scalpel.__version__)"
Docker permission denied¶
Cause: User not in docker group.
Solution:
MCP Connection Issues¶
"MCP server not found"¶
Cause: Server not running or misconfigured.
Check 1: Is the server running?
Check 2: Is the config correct?
"Connection refused" or timeout¶
Cause: Port conflict or firewall.
Solutions:
-
Check if another process uses the port:
-
Try a different port:
-
Check firewall rules
"Invalid MCP message"¶
Cause: Version mismatch or corrupted data.
Solution:
Analysis Errors¶
"Symbol not found: xyz"¶
Cause: The symbol name doesn't exist in the file.
Solution 1: Check spelling
Code Scalpel suggests corrections:
{
"error": {
"code": "SYMBOL_NOT_FOUND",
"symbol": "calculte",
"suggestions": ["calculate", "calculate_total"]
}
}
Solution 2: Analyze first
This shows all available symbols.
Solution 3: Check scope
Methods require class prefix:
"File not found: xyz.py"¶
Cause: Path is incorrect or file doesn't exist.
Solution:
Returns suggestions for similar files.
"Syntax error in file"¶
Cause: The file has invalid Python/JS/TS syntax.
Solution:
- Fix the syntax error in the source file
- Or specify language explicitly:
"Analysis timeout"¶
Cause: File or project too large.
Solutions:
-
Reduce scope:
-
Add exclude patterns:
-
Increase timeout (Pro+):
Security Scan Issues¶
"No vulnerabilities found" (false negative?)¶
Cause: Confidence threshold too high or taint source not recognized.
Solutions:
-
Lower confidence threshold:
-
Add custom taint sources:
"Too many false positives"¶
Cause: Confidence threshold too low or sanitizers not recognized.
Solutions:
-
Raise confidence threshold:
-
Add custom sanitizers:
Cross-file scan misses vulnerabilities¶
Cause: Taint flow too deep or modules not discovered.
Solutions:
-
Increase depth:
-
Specify entry points:
License Issues¶
"License not found"¶
Check 1: Environment variable
Check 2: File exists
Check 3: Correct path
"License expired"¶
Contact sales for renewal:
"License invalid"¶
Cause: Corrupted file or wrong license.
Solution:
- Re-download the license file
- Verify the download:
"Feature not available in your tier"¶
Cause: Trying to use Pro/Enterprise feature on Community.
Solution:
-
Check current tier:
-
Upgrade if needed
- Or use a Community-tier alternative
Performance Issues¶
Analysis is slow¶
Diagnosis:
Solutions:
-
Exclude unnecessary files:
-
Enable caching:
-
Reduce limits:
Memory issues¶
Cause: Large codebase or deep analysis.
Solutions:
-
Docker memory limit:
-
Reduce concurrent analysis: Analyze one directory at a time
Docker Issues¶
"Cannot mount volume"¶
Cause: Permission or path issues.
Solutions:
# Use absolute paths
docker run -v $(pwd):/workspace ghcr.io/codescalpel/code-scalpel
# Check SELinux (Linux)
docker run -v $(pwd):/workspace:Z ghcr.io/codescalpel/code-scalpel
Container exits immediately¶
Cause: Missing command or error.
Solution:
# Check logs
docker logs <container_id>
# Run interactively
docker run -it ghcr.io/codescalpel/code-scalpel bash
Getting Help¶
If these solutions don't help:
-
Search existing issues: GitHub Issues
-
Ask the community: GitHub Discussions
-
Report a bug: Include:
- Code Scalpel version (
code-scalpel --version) - Platform and OS
- Error message (full)
- Steps to reproduce