diff --git a/modules/python/src2/gen2.py b/modules/python/src2/gen2.py index cf60ea9785..55a79484ce 100755 --- a/modules/python/src2/gen2.py +++ b/modules/python/src2/gen2.py @@ -861,7 +861,7 @@ class PythonWrapperGenerator(object): decls = self.parser.parse(hdr) if len(decls) == 0: continue - self.code_include.write( '#include "{}"\n'.format(hdr[hdr.rindex('opencv2/'):]) ) + self.code_include.write( '#include "{0}"\n'.format(hdr[hdr.rindex('opencv2/'):]) ) for decl in decls: name = decl[0] if name.startswith("struct") or name.startswith("class"):