>>> "abcd%W"%(123)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: unsupported format character 'W' (0x57) at index 5
Could something like this work for you instead?
>>> "abcd%W".replace('%W', str(123))
'abcd123'