[pygtk] assertion g_utf8_validate failed when I set text to textview

saeed saeed.gnu at gmail.com
Wed Jul 15 08:04:27 WST 2009

Maybe the string has invalid UTF-8 characters. You may check and
correct it maulally, for example:
data = data.replace('\x00', '').decode('utf-8', 'replace').encode('utf-8')

On 7/15/09, nohics nohics <nohics at gmail.com> wrote:
> Hello all, I'm getting this error when I set a text on the textview (the
> text that I receive from an irc server when I connect to it):
> GtkWarning: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text,
> len, NULL)' failed
>    textviewBuffer.insert(textviewBuffer.get_end_iter(), data)
> What's the problem ?
> Thank you.

More information about the pygtk mailing list