I'm having some trouble using arcpy.ImportXMLWorkspaceDocument_management to import an XML document into a file geodatabase for a nightly backup routine. The code for the import is as follows:
try: arcpy.ImportXMLWorkspaceDocument_management(backUP, backUpGDB, "DATA","DEFAULTS") except Exception as error: print error else: fgdbFin = datetime.now() print "Finished backup process at: " + str(fgdbFin)
The error I'm getting reads: "ERROR 000791: Cannot access local or remote geodatabase."
Oddly, if I try running the Import XML Workspace Document tool in Catalog, it runs without an issue. I'm running the script from a virtual desktop which only has 4GB of memory and it does seem to tie up most of my memory when running though I'm not sure why it would throw this error and not crash due to lack of resources.
Has anyone experienced this and if so are there any workarounds or suggestions for getting this to run in Python?