Spaces:
Sleeping
Sleeping
Claude Code Claude Opus 4.6 commited on
Commit ·
4571fd5
1
Parent(s): a983f51
Claude Code: fix import path for brain_minimal module
Browse filesThe import path `openclaw.agents.brain_minimal` was incorrect because
the actual package structure has agents in `openclaw/.openclaw/agents/`.
Changed to `from agents.brain_minimal import BrainMinimal` which works
correctly after openclaw/__init__.py adds .openclaw to sys.path.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- app.py +2 -2
- error_handlers.py +1 -1
app.py
CHANGED
|
@@ -75,7 +75,7 @@ async def startup_event():
|
|
| 75 |
|
| 76 |
# Check brain_minimal
|
| 77 |
try:
|
| 78 |
-
from
|
| 79 |
logger.info(">>> STARTUP: brain_minimal module imported successfully")
|
| 80 |
except ImportError as e:
|
| 81 |
logger.warning(f">>> STARTUP: brain_minimal import failed: {e}")
|
|
@@ -123,7 +123,7 @@ async def health():
|
|
| 123 |
|
| 124 |
# 2. Check brain import (graceful - don't crash if import fails)
|
| 125 |
try:
|
| 126 |
-
from
|
| 127 |
brain = BrainMinimal(agent_name="cain", legacy_mode=True)
|
| 128 |
checks["brain"] = "ok"
|
| 129 |
except ImportError:
|
|
|
|
| 75 |
|
| 76 |
# Check brain_minimal
|
| 77 |
try:
|
| 78 |
+
from agents.brain_minimal import BrainMinimal
|
| 79 |
logger.info(">>> STARTUP: brain_minimal module imported successfully")
|
| 80 |
except ImportError as e:
|
| 81 |
logger.warning(f">>> STARTUP: brain_minimal import failed: {e}")
|
|
|
|
| 123 |
|
| 124 |
# 2. Check brain import (graceful - don't crash if import fails)
|
| 125 |
try:
|
| 126 |
+
from agents.brain_minimal import BrainMinimal
|
| 127 |
brain = BrainMinimal(agent_name="cain", legacy_mode=True)
|
| 128 |
checks["brain"] = "ok"
|
| 129 |
except ImportError:
|
error_handlers.py
CHANGED
|
@@ -112,7 +112,7 @@ def handle_brain_response(message: str) -> str:
|
|
| 112 |
AttributeError: If required brain methods are missing.
|
| 113 |
"""
|
| 114 |
try:
|
| 115 |
-
from
|
| 116 |
|
| 117 |
brain = BrainMinimal(agent_name="cain", legacy_mode=True)
|
| 118 |
result = brain._conversation_process(message)
|
|
|
|
| 112 |
AttributeError: If required brain methods are missing.
|
| 113 |
"""
|
| 114 |
try:
|
| 115 |
+
from agents.brain_minimal import BrainMinimal
|
| 116 |
|
| 117 |
brain = BrainMinimal(agent_name="cain", legacy_mode=True)
|
| 118 |
result = brain._conversation_process(message)
|