AnsweredAssumed Answered

ERROR 000582 - Create a checkout to a file GDB

Question asked by NEOMAPPER on Aug 21, 2018
Latest reply on Aug 22, 2018 by jborgion
we are encountering "error 000582: Error occurred during execution" while executing a python script creating a checkout replica. We were able to create the checkout replica successfully from ArcMap using the create replica geoprocessing tool. Script only works for SDE creds. We need other users to be able to replicate their own versions.

Software versions -- ArcGIS Desktop 10.6 | SQL Server 2012



Traceback (most recent call last):
  File "C:\Users\jnmiller\Desktop\", line 41, in <module>
    initial_sender, expand, reuse_schema, get_related, replica_geometry, archiving)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcPy\arcpy\", line 960, in CreateReplica
    raise e
ExecuteError: ERROR 000582: Error occurred during execution.
Failed to execute (CreateReplica).


# Description: Create a checkout to a file GDB

# Import system modules
import arcpy
from arcpy import env

#get list of versions that will be checked out
version_list = "GIS"

#specify the checkout number for version & GDB naming
checkout_number = 1

#specify folder location and file name for checkout
working_folder = r"C:\\"
working_file = "Test_%s_v%s.gdb" % (version_list, checkout_number)

# Set workspace
env.workspace = r"Database Connections\NEO.sde"

# Set local variables
in_data = ["ArchivedProposedMainline"]

replica_type = "CHECK_OUT"
output_workspace = "%s\%s" % (working_folder, working_file)
replica_name = "MyReplica_%s_v%s" % (version_list, checkout_number) # This creates the replica in the GDB manager
access_type = "FULL" # Supports complex types (topologies and geometric networks) and requires the data to be versioned.
initial_sender = "PARENT_DATA_SENDER"
expand = "USE_DEFAULTS"
reuse_schema = "DO_NOT_REUSE"
get_related = "GET_RELATED"
replica_geometry = ""
archiving = "DO_NOT_USE_ARCHIVING"

#create the empty GDB for checkout
arcpy.CreateFileGDB_management(working_folder, working_file)

# Execute CreateReplica
arcpy.CreateReplica_management(in_data, replica_type, output_workspace, replica_name, access_type, \
                               initial_sender, expand, reuse_schema, get_related, replica_geometry, archiving)