In the documentation:
.# Create the new utility network
arcpy.pt.StageUtilityNetwork(sde, service_territory, dataset, network_name)
I'm running stand-alone script, and got the error message"
AttributeError: module 'arcpy' has no attribute 'pt'
Not sure why this is happening..
Solved! Go to Solution.
What version of untools do you have installed? You can check by running the following from Python window:
Do you see the Utility Network Package Tools toolbox?
It's 2.3.2, I ran your command in Pro python editor.
However, if I run it in a stand-alone, it gives exception, and at the end of the long error traceback:
raise ImportError('dateutil 2.5.0 is the minimum required version')
ImportError: dateutil 2.5.0 is the minimum required version
Not sure if you got the solution yet.
It might worth to check with your python path where you installed the untools.
untools is normally required a clone python environment and it's a different python path from default ArcGIS Pro python location.
The different python path can be viewed from ArcGIS Pro /Python/management environment.
It will look similar to "C:\Users\Administrator\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone"
you can execute the
Somehow, you are not able to load the pt module but call arcpy.StageUtilityNetwork_pt() directly. It might something wrong in the python clone environment with an installed site package.