Create Replica python script gives error 00582

5591
2
05-23-2012 12:45 PM
TimTeaford
New Contributor
I am trying to schedule a python script to synchronize changes.  I created a model first with one command in it -- the create replica tool from ArcToolbox.  I exported the model to a python script and made a few changes.  One fix was to change "arceditor" to "arcinfo" because we don't have arceditor.

When I try to run the python script at the command prompt, I get the following error:

----------------------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Temp\MyCreateReplicaScript.py", line 28, in module
    arcpy.CreateReplica_management("'Database Connections\\SQL14 - BBCov - Loader.sde\\BBCov.L.BroadBand';'Database Connections\\SQL14 - BBCov - Loader.sde\\BBCov.L.AddPt';'Database Connections\\SQL14 - BBCov - Loader.sde\\BBCov.L.CAI';'Database Connections\\SQL14 - BBCov - Loader.sde\\BBCov.L.MidMile';'Database Connections\\SQL14 - BBCov - Loader.sde\\BBCov.L.ratetiers';'Database Connections\\SQL14 - BBCov - Loader.sde\\BBCov.L.SCAN_PTS';'Database Connections\\SQL14 - BBCov - Loader.sde\\BBCov.L.VALIDATION'", "CHECK_OUT", BroadBandMapping2_gdb__2_, "TodaysCheckOut5", "FULL", "CHILD_DATA_SENDER", "USE_DEFAULTS", "DO_NOT_REUSE", "GET_RELATED", "", "DO_NOT_USE_ARCHIVING")
  File "c:\program files (x86)\arcgis\engine10.0\ArcPy\arcpy\management.py", line 708, in CreateReplica
    raise e
arcgisscripting.ExecuteError: ERROR 000582: Error occurred during execution.
Failed to execute (CreateReplica).[/CODE
----------------------------------------------------------------------------------

I looked up the error 00582 and it said to look at the values of the parameters because the tool first does a check on the input parameters.

But it doesn't tell me which parameter value to fix. But hold on, didn't I export the script directly from a model?  You would think the code would work "as-is", but no.

Does anyone have any ideas on how to fix this or work around it?
Reply
0 Kudos
2 Replies
PaulKroseman
Occasional Contributor II
This error can occur if one or more of the feature classes and datasets are not versioned or don't have GlobalIDs. Is your data versioned with GlobalIDs?

If yes, I would test creating a replica on each individual dataset to see which one is causing the error. The code is probably correct but it finds one of the datasets as invalid for replication.
HeatherMcCracken
Occasional Contributor III
Try adding the data you want to replicate to ArcMap, and then using the Create Replica command off the Distributed Geodatabase toolbar instead of the GP tool.  The error messages it provides are more complete than when using the GP tool.

1) Open ArcMap and add the Distributed Geodatabase toolbar
2) Add your data to the map
3) Open the Create Replica wizard and attempt to create your replica ....

I anticipate you will still get an error, however hopefully it will be more informative and help you isolate the issue.

Let me know how it goes,
-Heather