Select to view content in your preferred language

Batch Trace Script: ExecuteError: 'in-table' is not table or a featureclass

1758
20
06-28-2025 06:30 AM
MichaelParma
Regular Contributor

Greetings,

I'm trying to run a batch trace via script in an attempt to speed up processing time on nearly 50,000 records outside of a map, writing summary statistics back to a text field. This is in a FGDB UN with attribute rules disabled. The trace configuration works fine individually and when executed from the Batch Trace dialogue. It fails when this is run from a Python Notebook.

My code:

arcpy.ImportToolbox(r"C:\Path\To\My\UtilityDataManagementSupport_33.atbx", "udms")
arcpy.udms.BatchTrace(
in_utility_network=r"C:\Path\To\My.gdb\Water\UtilityNetwork",
trace_locations=r"C:\Path\To\My.gdb\Water\WaterLine",
result_types="CALCULATE",
trace_config="Trace Config:: Isolating Features",
expression="ASSETGROUP = 1 and AssetType IN (0, 1, 2) and OBJECTID < 6", #OBJECTID is only for testing purposes
output_folder=None,
key_field="GLOBALID",
summary_store_field="analyticnotes",
fields=None,
calc_on_start="UPDATE_START_ROWS",
history_field=None,
default_terminal_id=None,
code_block=""
)

Executing this results in: 

ExecuteError: 'in_table' is not a table or a featureclass

In the traceback, I find this line which leads me to believe it might be related to the summary_store_field, though this field exists in the WaterLine feature class.

File "C:\Path\To\My\UtilityDataManagementSupport_33.atbx\udms\logic\un_trace.py", line 1291, in update_starting_points_with_summaries
    logger.exception(e, stack_info=True)

Any thoughts are appreciated!

0 Kudos
20 Replies
MikeMillerGIS
Esri Frequent Contributor

Ok, can you run this version of the tools?  You should not have to enable debug mode, this version will force it on.

Make sure to remove/delete the old atbx and restart pro.  Atbx are essentially zip files.  The compressed file includes a python module with all the logic.  Once python loads a module, it does not reload it.  So if Pro happens to load the old one, even if running the new toolbox, you get the old code.  There are a number of ways pro can load the old one, so best is to rename/remove/delete the old one(zip it if you want a back up)

 

https://github.com/Esri/Utility-Data-Management-Support-Tools/blob/preview_3.5.2/UtilityDataManageme...

 

0 Kudos