Package: bley
Version: 2.0.0-2
Severity: normal
Dear Maintainer,
tried to run bleygraph; ran into two issues:
1. bleygraph needs python-matplotlib, but the bley package doesn't
depend on (or even just suggest) it:
sascha@outpost:~$ sudo -u bley bleygraph -d /tmp/bley
Traceback (most recent call last):
File "/usr/bin/bleygraph", line 92, in <module>
import matplotlib
ImportError: No module named matplotlib
2. bleygraph apparently doesn't cope with the database config being
split out to dbconfig-common.conf. Depending on how it's invoked,
it either uses the (incorrect) database configuration from
bley.conf or chokes trying to parse dbconfig-common.conf:
sascha@outpost:~$ sudo -u bley bleygraph -d /tmp/bley
Traceback (most recent call last):
File "/usr/bin/bleygraph", line 103, in <module>
db = database.connect(**dbsettings)
sqlite3.OperationalError: unable to open database file
sascha@outpost:~$ sudo -u bley bleygraph -d /tmp/bley -c /etc/bley/bley.conf
-c /etc/bley/dbconfig-common.conf
Traceback (most recent call last):
File "/usr/bin/bleygraph", line 97, in <module>
dnswl_threshold = config.getint('bley', 'dnswl_threshold')
File "/usr/lib/python2.7/ConfigParser.py", line 359, in getint
return self._get(section, int, option)
File "/usr/lib/python2.7/ConfigParser.py", line 356, in _get
return conv(self.get(section, option))
File "/usr/lib/python2.7/ConfigParser.py", line 618, in get
raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'dnswl_threshold' in section: 'bley'
sascha@outpost:~$ sudo -u bley bleygraph -d /tmp/bley -c
/etc/bley/dbconfig-common.conf -c /etc/bley/bley.conf
Traceback (most recent call last):
File "/usr/bin/bleygraph", line 103, in <module>
db = database.connect(**dbsettings)
sqlite3.OperationalError: unable to open database file
sascha@outpost:~$ sudo -u bley ls -l /var/lib/bley
total 736
-rw-r----- 1 bley bley 749568 Feb 5 23:32 bley
-rw-r--r-- 1 bley bley 0 Feb 5 23:38 bley.db
After modifying bley.conf to match dbconfig-common.conf and
changing to the database directory first (it apparently ignores
the dbpath setting), I finally got bleygraph to work:
sascha@outpost:~$ sudo -u bley sh -c 'cd /var/lib/bley && bleygraph -d
/tmp/bley -c /etc/bley/bley.conf '
plotting 12h:
- /tmp/bley/ar-12h.png
- /tmp/bley/ch-12h.png
plotting 24h:
- /tmp/bley/ar-24h.png
- /tmp/bley/ch-24h.png
plotting 7d:
- /tmp/bley/ar-7d.png
- /tmp/bley/ch-7d.png
plotting 28d:
- /tmp/bley/ar-28d.png
- /tmp/bley/ch-28d.png
plotting 365d:
- /tmp/bley/ar-365d.png
- /tmp/bley/ch-365d.png
Sascha
-- System Information:
Debian Release: 8.7
APT prefers stable
APT policy: (990, 'stable'), (500, 'stable-updates'), (100, 'testing'), (1,
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-0.bpo.2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)