Fix string format error in 2.6

In 2.6, you should give index value to format.