File tree Expand file tree Collapse file tree 4 files changed +28
-8
lines changed
Expand file tree Collapse file tree 4 files changed +28
-8
lines changed Original file line number Diff line number Diff line change 77from fastapi import FastAPI , Request
88from fastapi .middleware .cors import CORSMiddleware
99
10- # Add common module to path
11- sys .path .insert (0 , str (__file__ ).replace ('/ai-agents/app/main.py' , '' ))
10+ # Add common module to path (fallback for local run, handled by PYTHONPATH in Docker)
11+ try :
12+ import common
13+ except ImportError :
14+ import sys
15+ from pathlib import Path
16+ sys .path .insert (0 , str (Path (__file__ ).resolve ().parent .parent .parent ))
1217
1318from .routes import router
1419
Original file line number Diff line number Diff line change 88from fastapi import FastAPI , Request
99from fastapi .middleware .cors import CORSMiddleware
1010
11- # Add common module to path
12- sys .path .insert (0 , str (__file__ ).replace ('/core-orbits/app/main.py' , '' ))
11+ # Add common module to path (fallback for local run, handled by PYTHONPATH in Docker)
12+ try :
13+ import common
14+ except ImportError :
15+ import sys
16+ from pathlib import Path
17+ sys .path .insert (0 , str (Path (__file__ ).resolve ().parent .parent .parent ))
1318
1419from .routes import router
1520from .demo_routes import router as demo_router
Original file line number Diff line number Diff line change 77from fastapi import FastAPI , Request
88from fastapi .middleware .cors import CORSMiddleware
99
10- # Add common module to path
11- sys .path .insert (0 , str (__file__ ).replace ('/ground-scheduler/app/main.py' , '' ))
10+ # Add common module to path (fallback for local run, handled by PYTHONPATH in Docker)
11+ try :
12+ import common
13+ except ImportError :
14+ import sys
15+ from pathlib import Path
16+ sys .path .insert (0 , str (Path (__file__ ).resolve ().parent .parent .parent ))
1217
1318from .routes import router
1419from .db import init_db , get_db
Original file line number Diff line number Diff line change 88from fastapi import FastAPI , Request
99from fastapi .middleware .cors import CORSMiddleware
1010
11- # Add common module to path
12- sys .path .insert (0 , str (__file__ ).replace ('/routing/app/main.py' , '' ))
11+ # Add common module to path (fallback for local run, handled by PYTHONPATH in Docker)
12+ try :
13+ import common
14+ except ImportError :
15+ import sys
16+ from pathlib import Path
17+ sys .path .insert (0 , str (Path (__file__ ).resolve ().parent .parent .parent ))
1318
1419from .routes import router
1520from .db import init_db , get_db
You can’t perform that action at this time.
0 commit comments