I think the use of %s is deprecated. You should use .format() instead
%s
.format()
https://pyformat.info/
https://stackoverflow.com/q/13451989