If there is not already a .gitmodules file, attempting to add a submodule through GitPython produces an IOError.
Creating the first submodule is a perfectly normal operation, and as such should not be considered an error - the .gitmodules file should just be created.