ValueError: A string literal cannot contain NUL (0x00) characters.
snippet in sql

ValueError: A string literal cannot contain NUL (0x00) characters.

user4714

s.decode("utf-8", errors="replace").replace("\x00", "\uFFFD")