Claude Code Claude Opus 4.6 commited on
Commit
1994d47
·
1 Parent(s): f0dff67

Claude Code: Fix openclaw import - copy __init__.py to /app/openclaw/

Browse files

The Dockerfile was only copying .openclaw/ but not openclaw/__init__.py,
causing import openclaw to fail silently. A2A communication requires
both files to be in place:
- /app/openclaw/__init__.py for "import openclaw"
- /app/.openclaw/ for "from agents import brain_minimal"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -19,8 +19,10 @@ COPY app.py error_handlers.py entrypoint.sh openclaw.json /app/
19
  COPY static/ /app/static/
20
  COPY frontend/ /app/frontend/
21
 
22
- # CRITICAL: Copy .openclaw to /app/.openclaw (not /app/openclaw/.openclaw)
23
- # The code expects /app/.openclaw/agents/ for brain imports
 
 
24
  COPY openclaw/.openclaw/ /app/.openclaw/
25
 
26
  # Create necessary directories with proper permissions
 
19
  COPY static/ /app/static/
20
  COPY frontend/ /app/frontend/
21
 
22
+ # CRITICAL: Copy both openclaw/__init__.py AND .openclaw for brain imports
23
+ # 1. openclaw/__init__.py is needed for "import openclaw" to work
24
+ # 2. .openclaw/ is needed for "from agents import brain_minimal" to work
25
+ COPY openclaw/__init__.py /app/openclaw/__init__.py
26
  COPY openclaw/.openclaw/ /app/.openclaw/
27
 
28
  # Create necessary directories with proper permissions