I am running Trace tool in pycharm IDE by copying the code snippet from arcgis pro Trace Tool from Utility Network Tools . Any suggestions please
Traceback (most recent call last):
File "D:\ARCPY\Transformer_Customer_Count_\test.py", line 72, in <module>
arcpy.un.Trace("Network Utility Network", "DOWNSTREAM", r"D:\ElectricUtilityNetworkFoundationV2_1\ElectricUtilityNetworkFoundation.gdb\UN_Temp_Starting_Points", r"D:\ElectricUtilityNetworkFoundationV2_1\ElectricUtilityNetworkFoundation.gdb\UN_Temp_Barriers", "Electric", "Electric Distribution", '', '', '', "INCLUDE_CONTAINERS", "INCLUDE_CONTENT", "INCLUDE_STRUCTURES", "INCLUDE_BARRIERS", "VALIDATE_CONSISTENCY", "'E:Device Status' IS_EQUAL_TO SPECIFIC_VALUE 1 OR;'Lifecycle Status' DOES_NOT_INCLUDE_ANY SPECIFIC_VALUE 24 OR;Category IS_EQUAL_TO SPECIFIC_VALUE E:Ground #", None, "BOTH_JUNCTIONS_AND_EDGES", None, None, "BOTH_JUNCTIONS_AND_EDGES", '', "DO_NOT_FILTER", None, '', None, None, None, "'E:Phases Normal' # PROPAGATED_BITWISE_AND INCLUDES_ANY 7", None, None, "EXCLUDE_ISOLATED_FEATURES", "DO_NOT_IGNORE_BARRIERS_AT_STARTING_POINTS", "DO_NOT_INCLUDE_UP_TO_FIRST_SPATIAL_CONTAINER", None, "NEW_SELECTION", "CLEAR_ALL_PREVIOUS_TRACE_RESULTS", '', "Trace_Results_Aggregated_Points", "Trace_Results_Aggregated_Lines", "Trace_Results_Aggregated_Polygons", "TRACE_INDETERMINATE_FLOW", "DO_NOT_VALIDATE_LOCATABILITY", "DO_NOT_USE_TRACE_CONFIGURATION", '', None, "RUN_SYNCHRONOUSLY")
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\un.py", line 3293, in Trace
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\un.py", line 3290, in Trace
retval = convertArcObjectToPythonObject(gp.Trace_un(*gp_fixargs((in_utility_network, trace_type, starting_points, barriers, domain_network, tier, target_tier, subnetwork_name, shortest_path_network_attribute_name, include_containers, include_content, include_structures, include_barriers, validate_consistency, condition_barriers, function_barriers, traversability_scope, filter_barriers, filter_function_barriers, filter_scope, filter_bitset_network_attribute_name, filter_nearest, nearest_count, nearest_cost_network_attribute, nearest_categories, nearest_assets, functions, propagators, output_assettypes, output_conditions, include_isolated_features, ignore_barriers_at_starting_points, include_up_to_first_spatial_container, result_types, selection_type, clear_all_previous_trace_results, trace_name, aggregated_points, aggregated_lines, aggregated_polygons, allow_indeterminate_flow, validate_locatability, use_trace_config, trace_config_name, out_json_file, run_async), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Utility Network: Dataset Network Utility Network does not exist or is not supported
ERROR 000800: The value is not a member of Or | And.
Failed to execute (Trace).
which condition applies in the error trackback
000800: The value is not a member of <value>.—ArcGIS Pro | Documentation
000732: <value>: Dataset <value> does not exist or is not supported.—ArcGIS Pro | Documentation
perhaps showing the inputs to the tool, then the copied script would help
Remember a standalone script would need to have environment parameters specifically specified, whereas a tool would usually know the the tool's environment