Spaces:
Sleeping
Sleeping
File size: 778 Bytes
b4a2e7f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | import sys
import os
import json
sys.path.append("/run/media/ishpreet/New Volume/Auribises/Vardhman Textiles/process-aware-ai/backend")
try:
from app.services.data_service import data_service
print("Loading data...")
data_service.load_data()
# Test with the problematic order
order_id = "81S_81S-25000172"
print(f"\n=== Testing: {order_id} ===")
result = data_service.get_sale_order_details(order_id)
if "error" in result:
print(f"Error: {result['error']}")
else:
print(f"Success! Keys: {list(result.keys())}")
print(f"Metrics: {result['metrics']}")
print(f"Intelligence keys: {list(result['intelligence'].keys())}")
except Exception as e:
import traceback
traceback.print_exc()
|