Open tw4l opened 2 years ago
Running into an issue serializing EXIF tool output:
File "/home/mike/repos/TEST/mt.py", line 11, in <module>
premis_object.serialize()
File "/home/mike/.local/lib/python3.10/site-packages/metsrw/plugins/premisrw/premis.py", line 135, in serialize
return data_to_premis(self._data, self.premis_version)
File "/home/mike/.local/lib/python3.10/site-packages/metsrw/plugins/premisrw/premis.py", line 722, in data_to_premis
return _data_to_lxml_el(data, "premis", nsmap)
File "/home/mike/.local/lib/python3.10/site-packages/metsrw/plugins/premisrw/premis.py", line 608, in _data_to_lxml_el
_data_to_lxml_el(
File "/home/mike/.local/lib/python3.10/site-packages/metsrw/plugins/premisrw/premis.py", line 608, in _data_to_lxml_el
_data_to_lxml_el(
File "/home/mike/.local/lib/python3.10/site-packages/metsrw/plugins/premisrw/premis.py", line 608, in _data_to_lxml_el
_data_to_lxml_el(
[Previous line repeated 2 more times]
File "/home/mike/.local/lib/python3.10/site-packages/metsrw/plugins/premisrw/premis.py", line 620, in _data_to_lxml_el
ret = func(*args)
File "src/lxml/builder.py", line 208, in lxml.builder.ElementMaker.__call__
File "src/lxml/etree.pyx", line 3022, in lxml.etree.Element
File "src/lxml/apihelpers.pxi", line 101, in lxml.etree._makeElement
File "src/lxml/apihelpers.pxi", line 1734, in lxml.etree._tagValidOrRaise
ValueError: Invalid tag name 'http://ns.exiftool.ca/exiftool/1.0/:exifToolVersion'```
Example code such as the following throws an exception:
This appears to be due to characterization tool namespaces not being in the namespaces map: