I was getting this error when running my gtk project from a terminal with `python3 myapp.py`, but not when launching my app via Sublime-Text-3's python build system! How weird.

```
TypeError: Item 0: Must be number, not str

```

---

The code at fault was essentially:

```
color_scheme = {'fg_color':'#ffffff', 'bg_color': '#000000',}
css = """
    GtkLabel {
        color: %(fg_color)s;
        background: %(bg_color)s;
    }
"""

# ...

cssprovider = Gtk.CssProvider()
css_data = css % color_scheme
cssprovider.load_from_data(css_data)

```