Package: bookletimposer
Version: 0.2-2
Severity: normal

when the current working directory contains a subdirectory called
'data', bookletimposer refuses to start, presenting this error message:

> Traceback (most recent call last):
>   File "/usr/bin/bookletimposer", line 142, in <module>
>     main()
>   File "/usr/bin/bookletimposer", line 123, in main
>     ui = gui.BookletImposerUI(preferences)
>   File "/usr/lib/python2.7/dist-packages/bookletimposer/gui.py", line 71, in 
> __init__
>     self.__create_gui()
>   File "/usr/lib/python2.7/dist-packages/bookletimposer/gui.py", line 81, in 
> __create_gui
>     builder.add_from_file(os.path.join(config.get_datadir(), 
> "bookletimposer.ui"))
> gi._glib.GError: Failed to open file 'data/bookletimposer.ui': No such file 
> or directory

the culprit is the get_datadir() function, which in __debug__ mode
(which is default in python, and only unset when invoking python as
`python -O`) takes a 'data' dir as *its* datadir if present.

given this probably relates to discovering helper files (like user
interface definition) during development or when not installed,
personally i'd go for moving the data files into a common "shared"
directory, have get_datadir() not handle the local case, and have a
BOOKLETIMPOSER_SHAREDIR=. environment variable set during development,
but it pretty much a matter of preference how to solve this bug.

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

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

Versions of packages bookletimposer depends on:
ii  gir1.2-gtk-3.0  3.10.2-1
ii  python          2.7.5-5
ii  python-gobject  3.10.2-2
ii  python-pypdf    1.13-1

bookletimposer recommends no packages.

bookletimposer suggests no packages.

-- no debconf information

-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom

Attachment: signature.asc
Description: Digital signature

Reply via email to