We are planning an update for the UC which will address this issue.
Here is the python script..watch out for any white spaces that may be generated when copying and pasting..onnce the KB article is released I will point to that support page.
First copy the .geodatabase file to your computer. You can get to the .geodatabase file under the ArcGIS_Collector folder > offline data > folder with user account name associated with downloaded data > folder with the webmap id > copy the .geodatabase and you paste it onto your computer.#!/usr/bin/python # Import sys, getopt, arceditor, arcpy modules import sys, getopt, arceditor, arcpy def main(argv): input_gdb = 'Enter .geodatabase location' output_gdb = 'Enter in an existing fgdb location you want data to be exported into' try: opts, args = getopt.getopt(argv,"hi:o:",["ifile=","ofile="]) except getopt.GetoptError: print 'test.py -i <input_gdb> -o <input_gdb>' sys.exit(2) for opt, arg in opts: if opt == '-h': print 'test.py -i <input_gdb> -o <output_gdb>' sys.exit() elif opt in ("-i", "--ifile"): input_gdb = arg elif opt in ("-o", "--ofile"): output_gdb = arg print 'Input gdb is: "', input_gdb print 'Output gdb is: "', output_gdb Temp_xml = "temp.xml" # Delete the xml workspace document if it exists. arcpy.Delete_management(Temp_xml) # Export XML Workspace Document arcpy.ExportXMLWorkspaceDocument_management(input_gdb, Temp_xml, "DATA", "BINARY", "METADATA") # Import XML Workspace Document. This assumes that the outputfile geodatabase is EMPTY. arcpy.ImportXMLWorkspaceDocument_management(output_gdb, Temp_xml, "DATA", "") # Delete the xml workspace document if it exists. arcpy.Delete_management(Temp_xml) if __name__ == "__main__": main(sys.argv[1:])
Russ
Hello,
I also wanted to say thank you for the tool. It helped me recover some of the data that was trapped on my Android tablet. Unfortunately some of the data that I collected was in a geodatabase with other files that had their attributes edited rather than collecting new features. When I try to recover this geodatabase I get the same error 999999 A row with this OID already exists.
Will there be any way to recover this data in the future, or is it lost forever?
Many thanks
Faye
Hi there,
We encountered a similar issue. We exported the geodatabase from the device to XML and wrote a simple script to assign new objectid's (after tring a dozen other options). The new object id's are incremented to avoid any duplicates. In our case the OID was not of relevance for the data set. Subsequently, the import of the XML succeeded. Just let me know if you're interested in the script.
Hi Michael,
Because my sync issues are related to edited data, when I run the script I get the following error:
A row with this OID already exists. Failed to execute (ImportXMLWorkspaceDocument).
I am very interested in your script, because it seems as though it addresses the duplicate OID error I get. Could you share your script with me and elaborate on exporting the geodatabase from the device to XML as well.
Thanks in advance.
Ed
Hi Michael -
Would you feel comfortable sharing your script? Assigning new object IDs to the XML would help us recover some data. Your help would be greatly appreciated!
Thanks,
Jon