Spaces:
Sleeping
Sleeping
Claude Code Claude Opus 4.6 commited on
Commit ·
46a5714
1
Parent(s): 4ed7171
Claude Code: Fix import paths in error_handlers.py
Browse files- Use 'from agents import brain_minimal' (matching app.py pattern)
- Use brain_minimal.get_brain() factory function instead of direct class instantiation
- This ensures proper module resolution in Docker runtime environment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- error_handlers.py +2 -2
error_handlers.py
CHANGED
|
@@ -148,9 +148,9 @@ def handle_brain_response(message: str) -> str:
|
|
| 148 |
try:
|
| 149 |
# Import openclaw first to set up sys.path, then import agents
|
| 150 |
import openclaw
|
| 151 |
-
from agents
|
| 152 |
|
| 153 |
-
brain =
|
| 154 |
result = brain._conversation_process(message)
|
| 155 |
|
| 156 |
if result.get("success"):
|
|
|
|
| 148 |
try:
|
| 149 |
# Import openclaw first to set up sys.path, then import agents
|
| 150 |
import openclaw
|
| 151 |
+
from agents import brain_minimal
|
| 152 |
|
| 153 |
+
brain = brain_minimal.get_brain(agent_name="cain", legacy_mode=True)
|
| 154 |
result = brain._conversation_process(message)
|
| 155 |
|
| 156 |
if result.get("success"):
|