Bug#360321: gramps: Fails to start: rd_object called with exception set

2006-04-05 Thread Alex Roitman
On Wed, 2006-04-05 at 19:08 +1000, Graham Williams wrote:
 This is curious. What version of python?

I have exact same version of python2.3 as you do.

  I get:
 
 $ python2.3
 Python 2.3.5 (#2, Mar  6 2006, 10:12:24)
 [GCC 4.0.3 20060304 (prerelease) (Debian 4.0.2-10)] on linux2
 Type help, copyright, credits or license for more information.
  import gtkspell
  import gtk
  gtkspell.Spell(gtk.TextView()).set_language(None)
 
 TypeError: argument 1 must be string, not None

OK, I added catching this exception as well. Here's the patch
against the 2.0.10 release. If you could apply it and tell me
how this works for you it would be great!

 It is almost as if there is an exception but it's capture is delayed.
 I've just deleted that line in the code for now and Gramps is
 working.  Hope it won't affect anything.

Yes. So the new code should both detect None explicitly and catch
the TypeError exception (in case something else is passed to
set_language() other than string).

Thanks,
Alex


diff -u -r1.1.2.7 -r1.1.2.9
--- src/Spell.py15 Oct 2005 04:29:19 -  1.1.2.7
+++ src/Spell.py5 Apr 2006 16:56:02 -   1.1.2.9
@@ -46,11 +46,16 @@
 import locale

 lang = locale.getlocale()[0]
-gtkspell.Spell(gtk.TextView()).set_language(lang)
-success = True
-
+if lang == None:
+print _(Spelling checker cannot be used without language
set.)
+print _(Set your locale appropriately to use spelling
checker.)
+else:
+gtkspell.Spell(gtk.TextView()).set_language(lang)
+success = True
 except ImportError, msg:
 print _(Spelling checker is not installed)
+except TypeError,msg:
+print Spell.py: , msg
 except RuntimeError,msg:
 print Spell.py: , msg
 except SystemError,msg:


-- 
Alexander Roitman   http://www.gramps-project.org


signature.asc
Description: This is a digitally signed message part


Bug#360321: gramps: Fails to start: rd_object called with exception set

2006-04-04 Thread Alex Roitman
On Wed, 2006-04-05 at 06:28 +1000, Graham Williams wrote:
 No. That did not help. The problem seems to be with Spell. If I
 comment out the line in Sources.py that imports Spell (just before the
 import of DdTargets), gramps at least starts up.
 
 In fact, if I comment out in Spell.py just:
 
 gtkspell.Spell(gtk.TextView()).set_language(lang)
 
 then again it starts up.
 
 Simulating this interactively:
 
 
 Python 2.3.5 (#2, Mar  6 2006, 10:12:24)
 [GCC 4.0.3 20060304 (prerelease) (Debian 4.0.2-10)] on linux2
 Type help, copyright, credits or license for more information.
  import gtk
  import gtkspell
  import locale
  lang = locale.getlocale()[0]
  lang
  lang==None
 True
  locale.getlocale()
 (None, None)
 
 
 That is perhaps the problem?

Well, setting the language to None should trigger an exception.
Here's what happens on my machine:
   $ python
import gtkspell
import gtk
gtkspell.Spell(gtk.TextView()).set_language(None)
   Traceback (most recent call last):
 File stdin, line 1, in ?
   RuntimeError: Error setting language

and GRAMPS would catch that exception. If the above crashes for you
instead of raising a RuntimeError exception then it seems to be
a bug in python2.3-gnome2-extras package.

GRAMPS could of course also work around this by checking for
lang being None and refusing to go further.

-- 
Alexander Roitman   http://www.gramps-project.org


signature.asc
Description: This is a digitally signed message part


Bug#360321: gramps: Fails to start: rd_object called with exception set

2006-04-03 Thread Alex Roitman
On Sat, 2006-04-01 at 19:32 +1100, Graham Williams wrote:
 On starting up gramps:
 
 XXX rd_object called with exception set

Is this exactly what is printed in the terminal?
Do you start gramps with anything else, besides
typing gramps on the command line?

 Traceback (most recent call last):
   File /usr/share/gramps/gramps.py, line 81, in ?
 import gramps_main 
   File /usr/share/gramps/gramps_main.py, line 59, in ?
 import MediaView
   File /usr/share/gramps/MediaView.py, line 49, in ?
 import ImageSelect
   File /usr/share/gramps/ImageSelect.py, line 62, in ?
 import Sources
   File /usr/share/gramps/Sources.py, line 56, in ?
 from DdTargets import DdTargets
 TypeError: argument 1 must be string, not None

Can you try this:
   $ cd /usr/share/gramps
from DdTargets import DdTargets
and tell if there are any errors?

Alex

-- 
Alexander Roitman   http://www.gramps-project.org



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#360321: gramps: Fails to start: rd_object called with exception set

2006-04-03 Thread Alex Roitman
On Mon, 2006-04-03 at 20:30 -0700, Alex Roitman wrote:
 Can you try this:
$ cd /usr/share/gramps
 from DdTargets import DdTargets

My apologies: forgot to insert the line to start python:
   $ cd /usr/share/gramps
   $ python
from DdTargets import DdTargets

-- 
Alexander Roitman   http://www.gramps-project.org


signature.asc
Description: This is a digitally signed message part


Bug#360321: gramps: Fails to start: rd_object called with exception set

2006-04-01 Thread Graham Williams
Package: gramps
Version: 2.0.10-1
Severity: important


On starting up gramps:

XXX rd_object called with exception set
Traceback (most recent call last):
  File /usr/share/gramps/gramps.py, line 81, in ?
import gramps_main 
  File /usr/share/gramps/gramps_main.py, line 59, in ?
import MediaView
  File /usr/share/gramps/MediaView.py, line 49, in ?
import ImageSelect
  File /usr/share/gramps/ImageSelect.py, line 62, in ?
import Sources
  File /usr/share/gramps/Sources.py, line 56, in ?
from DdTargets import DdTargets
TypeError: argument 1 must be string, not None

Regards,
Graham

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-686-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages gramps depends on:
ii  gconf22.14.0-1   GNOME configuration database syste
ii  python2.3.5-5An interactive high-level object-o
ii  python-glade2 2.8.2-3GTK+ bindings: Glade support
ii  python-gnome2 2.12.3-2   Python bindings for the GNOME desk
ii  scrollkeeper  0.3.14-10  A free electronic cataloging syste
ii  yelp  2.12.2-4   Help browser for GNOME 2

Versions of packages gramps recommends:
ii  graphviz2.8-0.4  rich set of graph drawing tools
ii  python-gnome2-extras2.12.1-2.1   Python bindings for the GNOME desk
ii  python-reportlab1.20debian-3 ReportLab library to create PDF do
ii  ttf-freefont20060126b-3  Freefont Serif, Sans and Mono True

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]