Apply Asset Package Error

680
1
06-19-2018 12:11 AM
rajeshkumarg1
New Contributor III

Hello, I am creating an 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 SQL Server 2014 database. I am trying to 'Apply an asset package'  and getting errors.

Error executing function.

The utility network association already exists.

Failed to execute (ImportAssociations).

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\un.py", line 2051, in ImportAssociations

   raise e

File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\un.py", line 2048, in ImportAssociations

   retval = convertArcObjectToPythonObject(gp.ImportAssociations_un(*gp_fixargs((in_utility_network, association_type, csv_file), 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 utility network association already exists.

Failed to execute (ImportAssociations).

Failed to execute (AssetPackageToUtilityNetwork).

 

Could anyone tell me what am I doing wrong?

0 Kudos
1 Reply
LoganSuhr_PSE
New Contributor III

I am also having a ton of trouble when applying the asset package with the option to load data.

I have found it necessary to truncate all of my feature classes, feature related tables and the associations table before attempting to apply the asset package a second time.  In this example, you would replace 'utilitynetwork' with your schema name:

use YOUR_DB
GO

TRUNCATE TABLE utilitynetwork.C_ASSOCIATIONS
TRUNCATE TABLE utilitynetwork.ELECTRICASSEMBLY
TRUNCATE TABLE utilitynetwork.ELECTRICCROSSARM
TRUNCATE TABLE utilitynetwork.ELECTRICDEVICE
TRUNCATE TABLE utilitynetwork.ELECTRICDEVICEUNIT
TRUNCATE TABLE utilitynetwork.ELECTRICJUNCTION
TRUNCATE TABLE utilitynetwork.ELECTRICLINE
TRUNCATE TABLE utilitynetwork.ELECTRICSUBNETLINE
TRUNCATE TABLE utilitynetwork.ELECTRICWIREDATA
TRUNCATE TABLE utilitynetwork.JOINTUSE
TRUNCATE TABLE utilitynetwork.STRUCTUREBOUNDARY
TRUNCATE TABLE utilitynetwork.STRUCTUREJUNCTION
TRUNCATE TABLE utilitynetwork.STRUCTURELINE

In the end, I am not loading data within the 'Apply Asset Package' tool.  Instead, I am manually appending all of my features and table records.

0 Kudos