#759377 "TypeError: TreePath does not support indexing" when installing new printer

#759377#5
Date:
2014-08-26 21:11:42 UTC
From:
To:
Dear Maintainer,

Installing a new printer through the interface, at the final step of
selecting the
(correctly recognized and pre-selected printer (e.g. Xerox Phaser 3140), the
wizard doesn't proceed -- it can be Closed, but Forward doesn't do anthing,
particularly it doesn't install the printer!

Running `system-config-printer --debug` reveals the following Python error:

Traceback (most recent call last):
  File "/usr/share/system-config-printer/newprinter.py", line 912, in
on_btnNPForward_clicked
    self.nextNPTab()
  File "/usr/share/system-config-printer/newprinter.py", line 1459, in
nextNPTab
    self.ppd = self.getNPPPD()
  File "/usr/share/system-config-printer/newprinter.py", line 3786, in
getNPPPD
    nr = model.get_path(iter)[0]
TypeError: 'TreePath' object does not support indexing

I did manage to fix it by changing the offending line (and another similar
line
futher below in the file) to:

  nr = int(str(model.get_path(iter)))

Not sure if it has something to do with Gtk3's PyGObject introspection (et
al.)
incompletely migrated into stable or whether it's a genuine overlooked bug,
I'm tagging it patch.