longs

Create replica problem-produces exception

Discussion created by longs on Jun 5, 2012
Latest reply on Nov 3, 2015 by crrose
Hello, I don't seem to be getting the CreateReplica_management call to work. It produces an error:
arcgisscripting.ExecuteError: ERROR 000582: Error occurred during execution.
Failed to execute (CreateReplica)

The code being used is below. Any help here would be much appreciate by this newbie python person...

import arcpy
from arcpy import env
import arcgisscripting

env.workspace = "C:\Documents and Settings\longs\Application Data\ESRI\Desktop10.0\ArcCatalog\SpatialVegMgmt_NT38.sde.DEFAULT"

tableset = "Actions, BioAgents, Density, Directions, Inspectors, MethodContacted, ROW, Units, weedFollowups, Weeds, WeedTypeRelate, WeedTypes, VegetationMgmt.GIS_SDE.weedIncidents"
replica_type = "CHECK_OUT"
output_workspace = "c:\usr_proj\ArcGIS\FileGeodatabases\Weed\Mark\WeedIncidents_FileGDB.gdb"
replica_name = "MarkReplica"
access_type = "FULL"
initial_sender = "PARENT_DATA_SENDER"
expand = "USE_DEFAULTS"
reuse_schema = "DO_NOT_REUSE"
get_related = "GET_RELATED"

arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.Actions", "Actions", "AID > 0")
arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.WEEDFOLLOWUPS", "WEEDFOLLOWUPS", "ObjectID > 0")
arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.Density", "Density", "DID > 0")
arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.Directions", "Directions", "GDID > 0")
arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.Inspectors", "Inspectors", "IID > 0")
arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.MethodContacted", "MethodContacted", "MCID > 0")
arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.ROW", "ROW", "ROWID > 0")
arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.Units", "Units", "UID > 0")
arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.Weeds", "Weeds", "WID > 0")
arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.WeedTypeRelate", "WeedTypeRelate", "ObjectID > 0")
arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.WeedTypes", "WeedTypes", "WTID > 0")
arcpy.MakeTableView_management("Database Connections\SpatialVegMgmt_NT38.sde\VegetationMgmt.owner.BioAgents", "BioAgents", "BAID > 0")

# Execute CreateReplica
arcpy.CreateReplica_management(tableset, replica_type, output_workspace, replica_name, access_type, initial_sender, expand, reuse_schema, get_related)


Steve

Outcomes