"exception while matching pot. mainfile" due to pot. mainfile being binary
Sometimes mainfile path patterns match binary files that cause:
Traceback (most recent call last):
File "/app/nomad/processing/data.py", line 437, in match_mainfiles
if parser.is_mainfile(filename, lambda fn: mainfile_f):
File "/app/nomad/parsing/parser.py", line 90, in is_mainfile
contents = file.read(500)
File "/usr/local/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfa in position 37: invalid start byte