calamari.exceptions.UnsupportedFileError#
- exception calamari.exceptions.UnsupportedFileError#
A file was read successfully but no registered loader recognised it.
Raised by
calamari.io.load()when content sniffing (see IO-1 indocs/ARCHITECTURE.md) finds no loader whosesniff()claims the file. This means the bytes were readable and simply are not a magnetometry file calamari knows how to parse – distinct from anOSError, which means the file could not be read at all.Use
calamari.io.is_supported_file()to test for this case without raising (e.g. when walking a directory of mixed content).