Software versions -- ArcGIS Desktop 10.6 | SQL Server 2012
Error:
Traceback (most recent call last):
File "C:\Users\jnmiller\Desktop\GEONET.py", line 41, in <module>
initial_sender, expand, reuse_schema, get_related, replica_geometry, archiving)
File "C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcPy\arcpy\management.py", line 960, in CreateReplica
raise e
ExecuteError: ERROR 000582: Error occurred during execution.
Failed to execute (CreateReplica).
Script:
# http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/create-replica.htm
# 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)
A couple things jump out at me:
line 15: the reason you use r is so you don't need to escape the slash:
my_path_variable = r'C:\'
I think the extra slash may be bombing in line 26
At line 23, you set in_data as a list: why is that? It may part of your problem as well.
The error description indicates you are not providing the proper parameters to arcpy.CreateReplica_management():
000582: Error occurred during execution.—Help | ArcGIS Desktop