Skip to content

If an extension is not registered, ``bob.io.base.load`` with crash the Python interpreter

The following script will reproduce the issue:

$ touch test.jpg

And then the script that will cause the crash:

import bob.io.base
bob.io.base.load('test.jpg')

Result:

$ python test.py
terminate called after throwing an instance of 'std::runtime_error'
  what():  unregistered extension: .jpg
Aborted (core dumped)

Expected result: Script is interrupted with a Python exception and does not core dump.