Your message dated Mon, 16 Sep 2013 20:24:57 -0500
with message-id <20130917012457.ga5...@piware.de>
and subject line Re: Bug#698459: python3-gi: Gtk.CssProvider.load_from_data 
won't accept str
has caused the Debian Bug report #698459,
regarding python3-gi: Gtk.CssProvider.load_from_data won't accept str
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
698459: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698459
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: python3-gi
Version: 3.4.2-2
Severity: normal

I'm not sure whether this bug is in python3-gi or gir1.2-gtk-3.0, but
the same code works in python 2 and not in python 3.

I have:

style_provider = Gtk.CssProvider()
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

-- System Information:
Debian Release: 7.0
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.6-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python3-gi depends on:
ii  gir1.2-glib-2.0        1.32.1-1
ii  libc6                  2.13-38
ii  libffi5                3.0.10-3
ii  libgirepository-1.0-1  1.32.1-1
ii  libglib2.0-0           2.33.12+really2.32.4-5
ii  multiarch-support      2.13-38
ii  python3                3.2.3-6

python3-gi recommends no packages.

python3-gi suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Josselin Mouette [2013-01-19 11:55 +0100]:
> Le vendredi 18 janvier 2013 à 21:10 +0000, Tony Houghton a écrit : 
> > 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""".

Indeed, closing. Alternatively, if you have an (unicode) string you
can also call .encode() on it to turn it into a byte array.

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

--- End Message ---

Reply via email to