On Tue 2017-01-17 00:08:10 -0500, Russ Allbery wrote:
> If one runs assword gui with its dependencies installed but without a
> full Gtk environment, it produces the following baffling error message:
>
> $ assword gui '<some-string>'
> Traceback (most recent call last):
>   File "/usr/bin/assword", line 11, in <module>
>     load_entry_point('assword==0.10', 'console_scripts', 'assword')()
>   File "/usr/lib/python3/dist-packages/assword/__main__.py", line 553, in main
>     func(args)
>   File "/usr/lib/python3/dist-packages/assword/__main__.py", line 327, in gui
>     from assword.gui import Gui
>   File "/usr/lib/python3/dist-packages/assword/gui.py", line 2, in <module>
>     gi.require_version('Gtk', '3.0')
>   File "/usr/lib/python3/dist-packages/gi/__init__.py", line 118, in 
> require_version
>     raise ValueError('Namespace %s not available' % namespace)
> ValueError: Namespace Gtk not available
>
> Installing gir1.2-gtk-3.0 resolves this error, but it's very difficult to
> discover that this is the fix, since there's no mention of this package
> anywhere in the assword package metadata.  I'm both an experienced Debian
> developer and use Python regularly, and it took me several months to
> finally hit on the right clues to track down this package, after lots of
> wasted time installing random Python Gtk packages and comparing all the
> Python libraries I had installed with another system where it was working.
>
> Could this please be listed in Recommends or in a README.Debian file or
> *somewhere* where people might be able to find it?

I think assword should either Depend: or Recommend: gir1.2-gtk-3.0.

python3-gi is just for generic gobject introspection, and it doesn't
guarantee that any particular gobject libraries are available.  It's
possible, for example, to use gobject introspection for something other
than Gtk (e.g. GMime, etc).

If assword depended on any other gobject libraries via introspection, it
would need to explicitly state them as well, not just python3-gi.

Thanks for identifying this, Russ!

I think the only question is whether Recommends: or Depends: is the
right choice.  Given that this is only invoked if you call "assword
gui", i think Recommends: would be a fair decision, but i also wouldn't
object to using Depends:, since assword is generally expected to be run
on a desktop machine.

     --dkg

Attachment: signature.asc
Description: PGP signature

Reply via email to