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

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -