Bug#698459: python3-gi: Gtk.CssProvider.load_from_data won't accept str
Josselin Mouette
joss at debian.org
Sat Jan 19 10:55:39 UTC 2013
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""".
Cheers,
--
.''`. Josselin Mouette
: :' :
`. `'
`-
More information about the pkg-gnome-maintainers
mailing list