Spaces:
Sleeping
Sleeping
Claude Code Claude Opus 4.6 commited on
Commit ·
a4b12ce
1
Parent(s): 2af593f
Claude Code: Fix missing Path import causing app.py startup failure
Browse filesThe Path class from pathlib was used but not imported, causing a
NameError at module load time that prevented FastAPI app initialization.
This broke A2A communication since the /a2a/jsonrpc endpoint was never
registered.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -21,6 +21,7 @@ if 'CAIN_STATUS_PATH' not in os.environ and 'OPENCLAW_DATA_DIR' in os.environ:
|
|
| 21 |
|
| 22 |
# CRITICAL: Create FastAPI app at TOP LEVEL, outside any try/except
|
| 23 |
# This ensures the server ALWAYS starts, even if brain is broken
|
|
|
|
| 24 |
from fastapi import FastAPI, Request
|
| 25 |
from fastapi.responses import JSONResponse, FileResponse
|
| 26 |
from fastapi.staticfiles import StaticFiles
|
|
|
|
| 21 |
|
| 22 |
# CRITICAL: Create FastAPI app at TOP LEVEL, outside any try/except
|
| 23 |
# This ensures the server ALWAYS starts, even if brain is broken
|
| 24 |
+
from pathlib import Path
|
| 25 |
from fastapi import FastAPI, Request
|
| 26 |
from fastapi.responses import JSONResponse, FileResponse
|
| 27 |
from fastapi.staticfiles import StaticFiles
|