Apply an asset package error message

1524
20
02-20-2018 09:30 AM
Highlighted
New Contributor II

Hello, I am struggling with creating en electric utility network inside my organization. I followed steps from documentation: Get started with the Electric Distribution Utility Network Configuration—Get Started | ArcGIS for El... and everything is configured as it should be. I am using PostgreSQL 9.5.7 database. My problem starts in the point 4.. I managed to 'Stage the Utility Network' but every time I am trying to 'Apply an asset package' I am getting errors. I have tried different configurations already but usually the error is: 

Running script AssetPackageToUtilityNetwork...
ArcGIS Pro 2.1.1.10257
untools 2.1.0.1
Updating schema on ElectricDistributionAssembly
Updating schema on ElectricDistributionDevice
Updating schema on ElectricDistributionJunction
Updating schema on ElectricDistributionLine
ERROR 999999: Error executing function.
The subtype already exists. [un.andreasbv.ElectricDistributionAssembly]
Failed to execute (AddSubtype).
EXCEPTION
Traceback (most recent call last):
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\untools\common\wrappers.py", line 90, in wrapper
return func(*args, **kwargs)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\untools\gptools\tools.py", line 300, in run
share.schema_apply()
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\untools\utils\shared_validation.py", line 504, in schema_apply
return self.apply()
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\untools\utils\shared_validation.py", line 450, in apply
result = func(**kwargs)
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 16618, in AddSubtype
raise e
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 16615, in AddSubtype
retval = convertArcObjectToPythonObject(gp.AddSubtype_management(*gp_fixargs((in_table, subtype_code, subtype_description), True)))
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 506, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
The subtype already exists. [un.andreasbv.ElectricDistributionAssembly]
Failed to execute (AddSubtype).
Failed to execute (AssetPackageToUtilityNetwork).

As an Asset Package I am using default geodatabase ElectricDistribution_AssetPackage.gdb, I am checking both Structure and ElectricDistribution and as Input I am using Utility Network created in previous step. I am not loading data as for a now I would like to have just a scheme. 

Could anyone tell me what am I doing wrong? I believe there is some detail which stands behind the logic of Utility Network Model but as documentation describe the process quite briefly I can't figure out appropriate approach.

Reply
0 Kudos
20 Replies
Highlighted
Occasional Contributor III

Did you have any maps open when running `Apply Asset Package`?

If you look are the subtype view on ElectricDistributionAssembly, does it match the properties page of the UN?

Reply
0 Kudos
Highlighted
New Contributor II

Thank you for quick reply! I had always background map open but I closed it today and run again and I got the same error. Answering your second question I am not sure if my previous step 'Stage the Utility Network' works correctly. After running it I am getting only layers from Structure Domain network:  

Is it correct? When I start running 'Apply Asset Package', Electric Distribution Domain Network five classes are being created and then the process fails. So I am not sure where can I find subtype view on ElectricDistributionAssembly. 

Reply
0 Kudos
Highlighted
Occasional Contributor III

You might want to try with a new UN if you are still getting the same error. When there is a map open, the layers are locked and unlocked hundreds of times.

'Stage the Utility Network' only ever creates the structure classes -- the domain network classes (in your case Electric Distribution), are added by 'Add Domain Network'

Highlighted
New Contributor II

Paul, thank you for help. I established new connection to newly created PostgreSQL database, staged UN again, and 'apply asset package'  finally worked. 

Reply
0 Kudos
Highlighted
Occasional Contributor

I had same error and not having map open helped. Just that error message doesn't relate anyway with map being open.

Reply
0 Kudos
Highlighted
Esri Contributor

Hi UN Team,

I am trying to build Electric Utility Network for a client here using Electric Asset Package with no changes. I get an error in Apply Asset Package that I cannot figure out how to fix.

Parameters
Asset Package D:\Projects\UtilityNetworkBuild\Electric_AssetPackage_GDA94.gdb
Domain Networks to apply Structure;ElectricDistribution;ElectricTransmission
Input Utility Network D:\Projects\UtilityNetworkBuild\BasicPackage\netadmin.sde\UN.NETADMIN.Networks\UN.NETADMIN.UNElectric
Load data true
Calculate Spatial Index and Analyze true
Output Utility Network

Messages
Start Time: Thursday, 24 January 2019 5:07:58 PM
Running script AssetPackageToUtilityNetwork...
ArcGIS Pro 2.2.4.12813
untools 2.2.2
ERROR 999999: Something unexpected caused the tool to fail. Please refer to the error help for potential solutions, or contact Esri Technical Support http://esriurl.com/support.
Table is already locked [Table is already locked[UN.NETADMIN.ElectricDistributionDevice.SUBNETWORKNAME]]
Failed to execute (AddTier).
Failed to execute (AssetPackageToUtilityNetwork).
Failed at Thursday, 24 January 2019 5:20:30 PM (Elapsed Time: 12 minutes 31 seconds)

There is no other app open, no map open, no SDE connection open. So not sure why "Table is already locked" unless there is some race condition in the tool.

Any help is much appreciated.

Reply
0 Kudos
Highlighted
Occasional Contributor III

Is there a map in your project with the UN layers added to it? Sometimes, that will happen even if the map is closed.

Otherwise, I'm not sure. If you run Apply again, does it fail in the same place?

Reply
0 Kudos
Highlighted
New Contributor

Hi Paul,
I am trying to create Electric Utility Network using Electric Asset Package tool. I got an error in Apply Asset Package that I cannot figure out how to fix.

I am using ArcGis pro 2.4.0 and asset package 3.1 version.

ERROR 001896: Invalid association parameters (row 2). A requested row object could not be located. .
Failed to execute (ImportAssociations).

Any help is much appreciated.

Reply
0 Kudos
Highlighted
Esri Contributor

Possibly, there are records in C_Associations table where from/to globalid does not exist in the specified from/to feature class.

Reply
0 Kudos