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:

     arcpy.ImportXMLWorkspaceDocument_management(backUP, backUpGDB, "DATA","DEFAULTS")

 except Exception as error:
     print error
     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?

closed as off-topic by PolyGeo Sep 24 '16 at 22:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • If you remove your try/except statements for testing then you may be able to get a more informative error message. In any event can you post a code snippet and the full error message from running that code snippet, please? – PolyGeo Sep 24 '16 at 22:39

Browse other questions tagged or ask your own question.