#!/usr/bin/env python3 """ Debug deployment error """ import sys import os sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) def simulate_deployment(): """Simulate the deployment process to find the Optional error""" try: print("Testing export_pipeline_data equivalent...") # Simulate creating a node and getting properties from core.nodes.exact_nodes import ExactModelNode # This would be similar to what dashboard does node = ExactModelNode() print("Node created") # Check if node has get_business_properties if hasattr(node, 'get_business_properties'): print("Node has get_business_properties") try: props = node.get_business_properties() print(f"Properties extracted: {type(props)}") except Exception as e: print(f"Error in get_business_properties: {e}") import traceback traceback.print_exc() # Test the mflow converter directly print("\nTesting MFlowConverter...") from core.functions.mflow_converter import MFlowConverter converter = MFlowConverter(default_fw_path='.') print("MFlowConverter created successfully") # Test multi-series config building test_props = { 'multi_series_mode': True, 'enabled_series': ['520', '720'], 'kl520_port_ids': '28,32', 'kl720_port_ids': '4' } config = converter._build_multi_series_config_from_properties(test_props) print(f"Multi-series config: {config}") print("All tests passed!") except Exception as e: print(f"Error: {e}") import traceback traceback.print_exc() if __name__ == "__main__": simulate_deployment()