The error is raised, if you try to use a wrong format identifier in a str as seen here:
print('{:3}'.format(['aa', 'bb'])) 
> TypeError: unsupported format string passed to list.__format__

but I’m unsure where exactly the error is coming from.
Could you post a minimal executable code snippet to reproduce this issue, please?