nekohayo / specto

Automatically exported from code.google.com/p/specto
0 stars 0 forks source link

startup fails due to wrong glade file path #69

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

-- What steps will reproduce the problem?
1. open terminal
2. cd to a directory with a "data/" subdir
2. run specto using the command "specto &" + ENTER
3. specto does not startup but throws a python exception

-- What is the expected output? What do you see instead?
This is the output, calling specto from a directory called
"/home/catchmeifyoutry/develop/clftp/trunk/":

(specto:21084): libglade-WARNING **: could not find glade file
'/home/catchmeifyoutry/develop/clftp/trunk/data/glade/notifier.glade'
Traceback (most recent call last):
  File "/usr/bin/specto", line 38, in <module>
    specto = Specto()
  File "/usr/lib/python2.5/site-packages/spectlib/main.py", line 117, in
__init__
    self.toggle_notifier()
  File "/usr/lib/python2.5/site-packages/spectlib/main.py", line 460, in
toggle_notifier
    self.notifier = Notifier(self)
  File "/usr/lib/python2.5/site-packages/spectlib/notifier.py", line 59, in
__init__
    self.wTree=gtk.glade.XML(gladefile,windowname, self.specto.glade_gettext)
RuntimeError: could not create GladeXML object

-- What version of the product are you using? On what operating system?
Ubuntu Feisty (7.04)
Specto 0.2 installed from universe repository

-- Please provide any additional information below.
The bug seems due to the following code in spectlib:
1. util.get_path() check using os.path.exists if the working dir contains a
data subdir (or file)
2. if such a subdir exists coincidently, util.get_path() will return the
wrong path for specto's data;
3. this is used in self.specto.PATH,
4. which is used to construct the gladefile path (in notifier.py)

A quickfix solution for me was to remove the check for the subdir.
This bug also seems to prevent me to start Specto using the deskbar applet,
and even the start menu. With the "data/" subdir check removed, it works
again. On the other hand, I remember starting it from the start menu
before, so I'm unsure why it doesn't work anymore.

Is there any reason why specto looks for a data/ subdir in the current
working dir ?? Development purposes maybe?

Thanks!

Original issue reported on code.google.com by catchmei...@gmail.com on 17 Sep 2007 at 6:55

GoogleCodeExporter commented 9 years ago
I tried running gutsy's stock specto from a terminal open in some random 
directory
(/tmp), and it started up fine. I don't know if that is what you did? Not sure I
understand the problem correctly.

If you are running the SVN version (alongside the 0.2 version or not), you need 
to
start it using launch.sh. What command did you use to start specto?

Original comment by nekoh...@gmail.com on 17 Sep 2007 at 1:05

GoogleCodeExporter commented 9 years ago
The check for the "data" dir is necessary to see if we have to use the specto 
library
or use the file paths for glade files.
In my dev branch i extended this check with the "spectlib" dir so now these 2 
dirs
need to be present before specto accepts that u used launch.sh to start specto

Original comment by woutclym...@gmail.com on 6 Jan 2008 at 11:21

GoogleCodeExporter commented 9 years ago

Original comment by woutclym...@gmail.com on 10 Feb 2008 at 4:41

GoogleCodeExporter commented 9 years ago

Original comment by nekoh...@gmail.com on 18 Mar 2008 at 2:32

GoogleCodeExporter commented 9 years ago
ah, great ;)
thanks

Original comment by catchmei...@gmail.com on 28 Mar 2008 at 12:36

GoogleCodeExporter commented 9 years ago
This is currently only fixed in the 0.3 development branch! (that will 
hopefully be
released soon)

For a fix in the 0.2 branch:
http://ubuntuforums.org/showthread.php?t=726960&highlight=specto

Original comment by woutclym...@gmail.com on 28 Mar 2008 at 12:38

GoogleCodeExporter commented 9 years ago
I'm running specto 0.3 rc1 on ubuntu 8.10 and i'm getting that error still

myusername@ubuntu:~$ specto

(specto:4053): libglade-WARNING **: could not find glade file
'/home/myusername/data/glade/notifier.glade'
Traceback (most recent call last):
  File "/usr/bin/specto", line 30, in <module>
    specto = Specto()
  File "/usr/lib/python2.5/site-packages/spectlib/main.py", line 109, in __init__
    self.notifier = Notifier(self)
  File "/usr/lib/python2.5/site-packages/spectlib/notifier.py", line 85, in __init__
    self.wTree = gtk.glade.XML(gladefile, windowname, self.specto.glade_gettext)
RuntimeError: could not create GladeXML object

If I cd to the Desktop and start specto from there it starts up fine.

Just an FYI.

- Jimmy

Original comment by jimmyp3...@gmail.com on 5 Mar 2009 at 3:35

GoogleCodeExporter commented 9 years ago
Now that's strange. Why is specto trying to look for that as if the prefix was ~
instead of /usr or something? Did you install specto using the .deb package?

Original comment by nekoh...@gmail.com on 5 Mar 2009 at 4:56

GoogleCodeExporter commented 9 years ago
Fixed in rev 140 from my branch

Original comment by woutclym...@gmail.com on 5 Mar 2009 at 5:13

GoogleCodeExporter commented 9 years ago
Jimmy, can you test wout's branch and see if it solves the problem on your end? 
You
can get it by doing

bzr branch lp:~woutc/specto/specto-woutc

Original comment by nekoh...@gmail.com on 5 Mar 2009 at 7:24

GoogleCodeExporter commented 9 years ago
One dirty solution is create shell script with

cd /usr/lib/python2.5/site-packages/spectlib && specto

and assing this script to launcher

Original comment by eder.sohe on 8 Mar 2009 at 3:36