Python: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters -
i'm using docx module python , mysql, problem today i'm having problem rised affecting row_cells[2].text = a
, knowing a
retrieved database, problem wasn't exisiting knowing same characters used before using query on duplicate key update
, , using %s
instead of .format()
.
the raised error valueerror: strings must xml compatible: unicode or ascii, no null bytes or control characters
i tried encode()
, encode(a,'utf-8')
, have # -*- coding: utf-8 -*-
in scripts
any please ?
edit: when set inserting %s works normal problem format() function? has explanation?
Comments
Post a Comment