Closed tom-montgomery closed 6 years ago
@tom-montgomery , thanks for reporting this. Interesting. The XML file you've attached is not the file that would be created when ExportReplicaSchema_management
runs, right? The reason I say that is because the .xml file created by this GP tool doesn't have any formatting such as new lines whereas yours has.
What I think you could do is to run the code in debugging mode and set a breakpoint on line
https://github.com/AlexArcPy/registrant/blob/master/registrant/_geodatabase.py#L77. Check the .xml file created and see what is loaded into the data
variable. I think it loads just a few lines instead of the whole .xml file contents. Play with the ET.fromstring(data)
and try to identify what's wrong with the .xml file created.
Yea its the export from ExportReplicaSchema_management... I will try debugging. I used brackets' beatufiy function to add formatting to make it readable. Thanks.
I think its because these databases are still version 9.3. Not sure if its fixable
Ah, interesting. If I remember right, the schema of geodatabase (including replica) has changed in 10.x, so I am afraid I won't be able to parse the 9.3 schema's XML. I guess most users are on 10.0+, so I don't think it would be worth trying to support the 9.3 version. @tom-montgomery , are you OK with that?
Definitely man all good. I just realized why because my replica2mxd was failing on the same databases. We really need to upgrade for a lot of reasons...we are oldschool like that haha. =)
The failure of parsing of replica's XML schema was caused by having the geodatabase in v 9.3. Only 10.0+ are supported by registrant
.
On a certain enterprise geodatabase registrant report_gdb_as_html fails with the following message:
This only occurs on one geodatabase, the others work as expected. Attached is the xml replica summary with connection data removed. replicaxml.zip