Trouble installing

0 views
Skip to first unread message

Pietro

unread,
Nov 28, 2008, 8:46:47 AM11/28/08
to Specto
Im trying to get Specto 0.2.2 running on my

Gentoo (kernel 2.6.26)
KDE 3.5
Python 2.5.2
PyGTK 2.13

system. (For gentoo folks I am using the ebuild from the sunrise
layman.)

The install seemed to go well but when I launch specto (from desktop
or console) nothing happens (well, there is a brief flicker of
activity in my system tray).Specto continues to run but there are no
visible consequences.

I turned on debugging as per the wiki but there were no messages. My
watch list is empty.

Any ideas how I should proceed? Really want to get this sweet looking
program running.

Thanks.

Wout Clymans

unread,
Nov 28, 2008, 9:02:36 AM11/28/08
to spe...@googlegroups.com
Is it possible that you have a folder called "data" in your home folder?
There is a know bug about this and it will be fixed in the next release.

Please open a terminal en type "specto"
This will give you more information and errors about what is going wrong.

I hope this will help you and thank you for using specto!

Wout

Pietro

unread,
Nov 28, 2008, 9:21:43 AM11/28/08
to Specto
On Nov 28, 2:02 pm, "Wout Clymans" <woutclym...@gmail.com> wrote:
> Is it possible that you have a folder called "data" in your home folder?There
> is a know bug about this and it will be fixed in the next release.
>
> Please open a terminal en type "specto"
> This will give you more information and errors about what is going wrong.
>
> I hope this will help you and thank you for using specto!
>
> Wout
>
> On Fri, Nov 28, 2008 at 2:46 PM, Pietro <pietro...@gmail.com> wrote:
>
> > Im trying to get Specto 0.2.2 running on my
>
> > Gentoo (kernel 2.6.26)
> > KDE 3.5
> > Python 2.5.2
> > PyGTK 2.13
>
> > system. (For gentoo folks I am using the ebuild from the sunrise
> > layman.)
>
> > The install seemed to go well but when I launch specto (from desktop
> > or console) nothing happens (well, there is a brief flicker of
> > activity in my system tray).Specto continues to run but there are no
> > visible consequences.
>
> > I turned on debugging as per the wiki but there were no messages. My
> > watch list is empty.
>
> > Any ideas how I should proceed? Really want to get this sweet looking
> > program running.
>
> > Thanks.

Thank you for developing specto!

Ah, I spoke too soon ... I had been running it from the console but
when there was no output I would kill it. I was being impatient
though, and when I left it for a few minutes it spat out this

Traceback (most recent call last):
File "/usr/bin/specto", line 38, in <module>
specto = Specto()
File "//usr/lib64/python2.5/site-packages/spectlib/main.py", line
113, in __init__
self.toggle_notifier()
File "//usr/lib64/python2.5/site-packages/spectlib/main.py", line
511, in toggle_notifier
self.notifier = Notifier(self)
File "//usr/lib64/python2.5/site-packages/spectlib/notifier.py",
line 93, in __init__
self.create_notifier_gui()
File "//usr/lib64/python2.5/site-packages/spectlib/notifier.py",
line 653, in create_notifier_gui
self.wTree.get_widget("imgWatch").set_from_pixbuf
(self.specto.icon_theme.load_icon("dialog-information", 64, 0))
glib.GError: Icon 'dialog-information' not present in theme

which is an error alreay report in Gentoo bugzilla. I guess the thing
to do is track down that icon in the gentoo repos ...

Jeff Fortin

unread,
Nov 28, 2008, 9:30:23 AM11/28/08
to spe...@googlegroups.com
Hmmm. Seems like this is the "we load icons from gnome-icon-theme without actually doing checks" bug, which was, I think, addressed in the development series...

Perhaps you would be interested in using the current development (0.3 version) of specto (there are some instructions on the wiki)? It's actually more stable/less buggy than the 0.2 release at the moment :)

Pietro

unread,
Nov 28, 2008, 9:38:36 AM11/28/08
to Specto
I don't know anything about Python, but I grep'ed the source and the
way it goes about fetching icons looks eminantly reasonable to me,

import gtk
...
self.icon_theme = gtk.icon_theme_get_default()
....
self.specto.icon_theme.load_icon("dialog-information", 64, 0)

And given that a locate on my system reveals I do indeed have the
icons installed it seems odd to me that they can'tbe found ...

/usr/share/icons/gnome/22x22/status/dialog-information.png
/usr/share/icons/gnome/24x24/status/dialog-information.png
/usr/share/icons/gnome/32x32/status/dialog-information.png
/usr/share/icons/gnome/scalable/status/dialog-information.svg

Wout Clymans

unread,
Nov 28, 2008, 9:42:22 AM11/28/08
to spe...@googlegroups.com
hmm i am not sure but it seems you don't have 64x64 icon and i think this is your problem.

Wout

Pietro

unread,
Nov 28, 2008, 10:08:40 AM11/28/08
to Specto


On Nov 28, 2:42 pm, "Wout Clymans" <woutclym...@gmail.com> wrote:
> hmm i am not sure but it seems you don't have 64x64 icon and i think this is
> your problem.
> Wout
>
> On Fri, Nov 28, 2008 at 3:38 PM, Pietro <pietro...@gmail.com> wrote:
>
> > On Nov 28, 2:30 pm, Jeff Fortin <nekoh...@gmail.com> wrote:
> > > Hmmm. Seems like this is the "we load icons from gnome-icon-theme
> > > without actually doing checks" bug, which was, I think, addressed in the
> > > development series...
>
> > > Perhaps you would be interested in using the current development (0.3
> > > version) of specto (there are some instructions on the wiki)? It's
> > > actually more stable/less buggy than the 0.2 release at the moment :)
>
> > I don't know anything about Python, but I grep'ed the source and the
> > way it goes about fetching icons looks eminantly reasonable to me,
>
> > import gtk
> > ...
> > self.icon_theme = gtk.icon_theme_get_default()
> > ....
> > self.specto.icon_theme.load_icon("dialog-information", 64, 0)
>
> > And given that a locate on my system reveals I do indeed have the
> > icons installed it seems odd to me that they can'tbe found ...
>
> > /usr/share/icons/gnome/22x22/status/dialog-information.png
> > /usr/share/icons/gnome/24x24/status/dialog-information.png
> > /usr/share/icons/gnome/32x32/status/dialog-information.png
> > /usr/share/icons/gnome/scalable/status/dialog-information.svg

A print statement added to main.py reveals the following icon search
paths:

('/home/pietro/.icons', '/home/pietro/.local/share/icons', '/usr/share/
icons', '/usr/local/share/icons', '/usr/kde/4.0/share/icons', '/usr/
kde/3.5/share/icons', '/usr/share/pixmaps', '/usr/local/share/
pixmaps', '/usr/kde/4.0/share/pixmaps', '/usr/kde/3.5/share/pixmaps')

I'm guessing a symlink is the easiest solution, but I'm not sure in
which of the above I should put it, and exactly where it hould point
to (given that the icons are in /usr/share/icons/gnome/NNxNN/status).
Would you care to take a guess?

Wout Clymans

unread,
Nov 28, 2008, 10:52:54 AM11/28/08
to spe...@googlegroups.com
These are the locations where i found the icon on my system:
/usr/share/icons/Human/48x48/status/dialog-information.png
/usr/share/icons/Human/16x16/status/dialog-information.png
/usr/share/icons/Human/22x22/status/dialog-information.png
/usr/share/icons/Human/24x24/status/dialog-information.png
/usr/share/icons/gnome/32x32/status/dialog-information.png
/usr/share/icons/gnome/16x16/status/dialog-information.png
/usr/share/icons/gnome/22x22/status/dialog-information.png
/usr/share/icons/gnome/24x24/status/dialog-information.png
/usr/share/icons/Neu/128x128/status/dialog-information.png
/usr/share/icons/Neu/48x48/status/dialog-information.png
/usr/share/icons/Neu/22x22/status/dialog-information.png
/usr/share/icons/Neu/24x24/status/dialog-information.png

So it seems you have to install a gnome theme. (Human/Neu are themes)

Wout

Pietro

unread,
Nov 28, 2008, 1:59:00 PM11/28/08
to Specto


On Nov 28, 3:52 pm, "Wout Clymans" <woutclym...@gmail.com> wrote:
> These are the locations where i found the icon on my system:
> /usr/share/icons/Human/48x48/status/dialog-information.png
> /usr/share/icons/Human/16x16/status/dialog-information.png
> /usr/share/icons/Human/22x22/status/dialog-information.png
> /usr/share/icons/Human/24x24/status/dialog-information.png
> /usr/share/icons/gnome/32x32/status/dialog-information.png
> /usr/share/icons/gnome/16x16/status/dialog-information.png
> /usr/share/icons/gnome/22x22/status/dialog-information.png
> /usr/share/icons/gnome/24x24/status/dialog-information.png
> /usr/share/icons/Neu/128x128/status/dialog-information.png
> /usr/share/icons/Neu/48x48/status/dialog-information.png
> /usr/share/icons/Neu/22x22/status/dialog-information.png
> /usr/share/icons/Neu/24x24/status/dialog-information.png
>
> So it seems you have to install a gnome theme. (Human/Neu are themes)
>
> Wout
>
I think it's more difficult than that. Its one thing to get the icons
installed, but another to find them. I'm not certain but I dont think
gtk.icon_theme_get_default() will find Gnome icons on KDE.

Anyway, I submit this as a hack. It's not my work. I stole it from
http://code.google.com/p/pychess/issues/detail?id=302. It's not quite
perfect but it's enough to get us beleagured KDE users going.

--- ../main.py 2007-07-01 13:11:43.000000000 +0100
+++ spectlib/main.py 2008-11-28 17:48:56.000000000 +0000
@@ -96,6 +96,50 @@
if GTK:
self.tray = Tray(self)
self.icon_theme = gtk.icon_theme_get_default()
+ import re, os
+ if not self.icon_theme.lookup_icon("dialog-information",
64, gtk.ICON_LOOKUP_USE_BUILTIN):
+ class SimpleIconTheme:
+ def __init__ (self):
+ self.sizeDirReg = re.compile("(\d+)x(\d+)")
+ folders = ("/usr/share/icons/", "/usr/local/
share/icons/")
+ self.icons = {}
+ for folder in folders:
+ if os.path.isdir(folder):
+ self.loadIcons(folder, self.icons)
+
+ def loadIcons (self, folder, dic, size=None):
+ for file in os.listdir(folder):
+ joined = os.path.join(folder, file)
+ if os.path.isdir(joined):
+ if not size:
+ match = self.sizeDirReg.match(file)
+ if match:
+ subsize = int(match.groups()
[0])
+ self.loadIcons(joined, dic,
subsize)
+ continue
+ self.loadIcons(joined, dic, size)
+ elif size and file.endswith(".png"):
+ name = file[:-4]
+ if not name in dic:
+ dic[name] = {}
+ dic[name][size] = joined
+
+ def load_icon(self, name, size, *args):
+ if name in self.icons:
+ if size in self.icons[name]:
+ filename = self.icons[name][size]
+ else:
+ sizes = self.icons[name].keys()
+ sizes = [(abs(s-size),s) for s in
sizes]
+ sizes.sort()
+ filename = self.icons[name][sizes[0]
[1]]
+ return gtk.gdk.pixbuf_new_from_file
(filename)
+ else:
+ self.logger.log.error("Unable to load icon:
%s at size: %d\n" % (name, size))
+ return gtk.gdk.Pixbuf
(gtk.gdk.COLORSPACE_RGB, True, 8, size, size)
+
+ gtk.icon_theme_get_default = lambda: SimpleIconTheme()
+ self.icon_theme = gtk.icon_theme_get_default()
self.watch_db = {}
self.watch_io = Watch_io()
watch_value_db = self.watch_io.read_options()

Pietro

unread,
Nov 28, 2008, 1:59:23 PM11/28/08
to Specto


On Nov 28, 3:52 pm, "Wout Clymans" <woutclym...@gmail.com> wrote:
> These are the locations where i found the icon on my system:
> /usr/share/icons/Human/48x48/status/dialog-information.png
> /usr/share/icons/Human/16x16/status/dialog-information.png
> /usr/share/icons/Human/22x22/status/dialog-information.png
> /usr/share/icons/Human/24x24/status/dialog-information.png
> /usr/share/icons/gnome/32x32/status/dialog-information.png
> /usr/share/icons/gnome/16x16/status/dialog-information.png
> /usr/share/icons/gnome/22x22/status/dialog-information.png
> /usr/share/icons/gnome/24x24/status/dialog-information.png
> /usr/share/icons/Neu/128x128/status/dialog-information.png
> /usr/share/icons/Neu/48x48/status/dialog-information.png
> /usr/share/icons/Neu/22x22/status/dialog-information.png
> /usr/share/icons/Neu/24x24/status/dialog-information.png
>
> So it seems you have to install a gnome theme. (Human/Neu are themes)
>
> Wout
>
Oh and many thanks for all the prompt and helpful replies.

Pietro

unread,
Nov 28, 2008, 1:59:38 PM11/28/08
to Specto


On Nov 28, 3:52 pm, "Wout Clymans" <woutclym...@gmail.com> wrote:
> These are the locations where i found the icon on my system:
> /usr/share/icons/Human/48x48/status/dialog-information.png
> /usr/share/icons/Human/16x16/status/dialog-information.png
> /usr/share/icons/Human/22x22/status/dialog-information.png
> /usr/share/icons/Human/24x24/status/dialog-information.png
> /usr/share/icons/gnome/32x32/status/dialog-information.png
> /usr/share/icons/gnome/16x16/status/dialog-information.png
> /usr/share/icons/gnome/22x22/status/dialog-information.png
> /usr/share/icons/gnome/24x24/status/dialog-information.png
> /usr/share/icons/Neu/128x128/status/dialog-information.png
> /usr/share/icons/Neu/48x48/status/dialog-information.png
> /usr/share/icons/Neu/22x22/status/dialog-information.png
> /usr/share/icons/Neu/24x24/status/dialog-information.png
>
> So it seems you have to install a gnome theme. (Human/Neu are themes)
>
> Wout
>
Reply all
Reply to author
Forward
0 new messages