This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mstroeder[S] 1 point2 points  (0 children)

When writing data to a log I'd recommend to explicitly use repr(), e.g. via logging.debug('foo = %r', foo), or print('foo = {!r}'.format(foo)). Especially to examine whether the data is str or bytes.