Bug#698459: python3-gi: Gtk.CssProvider.load_from_data won't accept str
Tony Houghton
h at realh.co.uk
Sat Jan 19 13:06:40 UTC 2013
On Sat, 19 Jan 2013 11:55:39 +0100
Josselin Mouette <joss at debian.org> wrote:
> Le vendredi 18 janvier 2013 à 21:10 +0000, Tony Houghton a écrit :
> > style_provider.load_from_data(
> > """* {
> > -GtkButton-default-border : 0;
> > -GtkButton-default-outside-border : 0;
> > -GtkButton-inner-border: 0;
> > -GtkWidget-focus-line-width : 0;
> > -GtkWidget-focus-padding : 0;
> > padding: 0;
> > }""")
> >
> > and with python3 the second line generates this error:
> >
> > TypeError: Item 0: Must be number or single byte string, not str
>
> Well, if Python wants a byte string, send it a byte string, not a
> unicode one.
> That is, b"""blah blah blah""".
Oh. I knew python 3 str had been made unicode but I didn't know raw
strings were still supported that way.
This isn't looking good for python3 being the solution where python2-gi
can't read GTK widgets containing unicode characters. :-(
More information about the pkg-gnome-maintainers
mailing list