Spaces:
Running
Running
debug: add detailed import debugging for src.models
Browse files
app.py
CHANGED
|
@@ -23,6 +23,21 @@ try:
|
|
| 23 |
import src
|
| 24 |
|
| 25 |
print(f"✓ src package found at: {src.__file__}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
except ImportError as e:
|
| 27 |
print(f"✗ Failed to import src: {e}")
|
| 28 |
print(f"sys.path: {sys.path[:3]}")
|
|
|
|
| 23 |
import src
|
| 24 |
|
| 25 |
print(f"✓ src package found at: {src.__file__}")
|
| 26 |
+
|
| 27 |
+
# Try to import subpackages
|
| 28 |
+
try:
|
| 29 |
+
import src.models
|
| 30 |
+
|
| 31 |
+
print(f"✓ src.models found at: {src.models.__file__}")
|
| 32 |
+
except ImportError as e:
|
| 33 |
+
print(f"✗ src.models failed: {e}")
|
| 34 |
+
import os
|
| 35 |
+
|
| 36 |
+
models_path = os.path.join(os.path.dirname(src.__file__), "models")
|
| 37 |
+
print(f" models dir exists: {os.path.exists(models_path)}")
|
| 38 |
+
if os.path.exists(models_path):
|
| 39 |
+
print(f" models contents: {os.listdir(models_path)[:5]}")
|
| 40 |
+
|
| 41 |
except ImportError as e:
|
| 42 |
print(f"✗ Failed to import src: {e}")
|
| 43 |
print(f"sys.path: {sys.path[:3]}")
|