vtkcomparison does not work for binary data (throwing a UnicodeDecodeError)
For a simple vtk comparison test, I get:
Traceback (most recent call last):
File "/home/dominic/dune/build/dune-python/python3-env/bin/dune_vtkcompare.py", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/home/dominic/dune/dune-testtools/python/wrapper/dune_vtkcompare.py", line 112, in <module>
verbose=True)
File "/home/dominic/dune/dune-testtools/python/dune/testtools/wrapper/fuzzy_compare_vtk.py", line 43, in compare_vtk
root1 = ET.fromstring(open(vtk1).read())
File "/usr/lib/python3.4/codecs.py", line 313, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x98 in position 894: invalid start byte
switching to python2 instead gives a different error in the same place
Traceback (most recent call last):
File "/home/dominic/dune/build/dune-python/python2-env/bin/dune_vtkcompare.py", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/home/dominic/dune/dune-testtools/python/wrapper/dune_vtkcompare.py", line 112, in <module>
verbose=True)
File "/home/dominic/dune/dune-testtools/python/dune/testtools/wrapper/fuzzy_compare_vtk.py", line 43, in compare_vtk
root1 = ET.fromstring(open(vtk1).read())
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
parser.feed(text)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 19, column 5
MY CMakeLists.txt:
dune_add_system_test(TARGET poisson_numdiff
INIFILE poisson.mini
SCRIPT dune_vtkcompare.py
)
dune_symlink_to_source_files(FILES poisson_ref.vtu)
and the metaini:
[wrapper.vtkcompare]
name = poisson
reference = poisson_ref
extension = vtu
I really do not get what is the issue here, maybe you can help.