diff --git a/bob/io/base/hdf5.cpp b/bob/io/base/hdf5.cpp
index f218d0a01bda31f8dee677688e57d43347f86381..47cb7735fa8d55cd7d6da73dd38437e704da6cb6 100644
--- a/bob/io/base/hdf5.cpp
+++ b/bob/io/base/hdf5.cpp
@@ -769,7 +769,7 @@ static PyObject* PyBobIoHDF5File_SubGroups(PyBobIoHDF5FileObject* self, PyObject
 
   PyObject* pyrel = 0;
   PyObject* pyrec = 0;
-  if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &pyrel, &pyrec)) return 0;
+  if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &pyrel, &pyrec)) return 0;
 
   bool relative = false;
   if (pyrel && PyObject_IsTrue(pyrel)) relative = true;