AnsweredAssumed Answered

Arcpy Error: Out of Memory"

Question asked by NEOMAPPER on Aug 8, 2018
Latest reply on Aug 8, 2018 by NEOMAPPER

When I run my py script I get an "Error: Out of Memory" at the last task arcpy.ImportXMLWorkspaceDocument_management. We're using 10.6 software by Esri. Does anyone know if it's related to how I wrote the script or possibly some other problem?


# Name:
# Description: Import/Export the contents of my geodatabase to an XML workspace document.

# Import system modules
import arcpy
import os
import platform
import imp
import time

xmlDocument = r"C:\EnterpriseGDB.xml"

if arcpy.Exists(xmlDocument):
    print("Removing xml document")

# Set overwrite output
arcpy.env.OverwriteOutput = True

# Set local variables for exports
in_data = r"Database Connections\SDE.sde"
out_file = r"C:\EIS\EISMASTER\eis shape\ArcMap\EnterpriseGDB.xml"
export_option = "DATA"
storage_type = "BINARY"
export_metadata = "METADATA"

# Set local variables for imports
target_gdb = r"C:\EIS\EISMASTER\eis shape\ArcMap\UPDM.gdb"
in_file = r"C:\EIS\EISMASTER\eis shape\ArcMap\EnterpriseGDB.xml"
import_type = "DATA"
config_keyword = "DEFAULTS"

print("Exporting SDE to XML Document")
# Execute ExportXMLWorkspaceDocument
arcpy.ExportXMLWorkspaceDocument_management(in_data, out_file, export_option, storage_type, export_metadata)
print("Finished Exporting")
print("Importing NEW XML Document to Local GDB")
# Execute ImportXMLWorkspaceDocument
arcpy.ImportXMLWorkspaceDocument_management(target_gdb, in_file, import_type, config_keyword)
print("Finished Importing!")