Problem: mets-reader-writer (metsrw) cannot handle comments in third-party XML #1277
Labels
Ⓜ️ mets/premis
METS/PREMIS issues
Picturae
Type: bug
A flaw in the code that causes the software to produce an incorrect or unexpected result.
Milestone
Expected behaviour
Given a METS file produced by archivematica, METS-reader-writer should be able to consume that file in its entirety so that the library can be used externally for whatever intended purpose.
Current behaviour
Given a METS file produced by Archivematica. If the external tool output in the object characteristics extension contains XML comments then we will see an
AttributeError
.Steps to reproduce
Using a default Archivematica, create a transfer with the Disk Image sample transfer and download the METS. The tool output should come from
fiwalk
I believe, and there will be a number of<!-- xml comments -->
.Next, create a sample
metsrw
script.Something like:
And your error should be ready.
Example cut-down METS
Your environment (version of Archivematica, operating system, other relevant details)
mets-reader-writer 0.3.15.
Additional info
A little from stack-overflow about one way to avoid this: https://stackoverflow.com/a/18313932
For Artefactual use:
Before you close this issue, you must check off the following:
The text was updated successfully, but these errors were encountered: