Description of problem: When trying to use Dogtail or sniff on Fedora 7 it crashes with error: TypeError: exceptions must be strings, classes, or instances, not SpiException Version-Release number of selected component (if applicable): dogtail-0.6.1-1.fc7 How reproducible: Always Steps to Reproduce: 1. Install Fedora 7 (xen guest) 2. Log in and upgrade with latest packages. 3. yum install dogtail 4. Enable accessibility 5. Reboot (step #2 requires it) 6. Login and run 'sniff' in terminal (or from dogtail.tree import root in python) Actual results: Dogtil crashes. Expected results: Dogtail should not crash. Additional info: Traceback: alexx@xen49:~$ sniff Creating logfile at /tmp/dogtail/logs/sniff_20070626-073608_debug ... Detecting distribution: Fedora (or derived distribution) GTK Accessibility Module initialized Traceback (most recent call last): File "/usr/bin/sniff", line 10, in <module> from dogtail import tree File "/usr/lib/python2.5/site-packages/dogtail/tree.py", line 1254, in <module> children = root.children File "/usr/lib/python2.5/site-packages/dogtail/tree.py", line 467, in __getattr__ try: a = self.__accessible.getChildAtIndex (i) File "pyspi.pyx", line 497, in atspi.Accessible.getChildAtIndex File "pyspi.pyx", line 146, in atspi.exception_handler TypeError: exceptions must be strings, classes, or instances, not SpiException
Created attachment 157884 [details] console log showing the crash and versions of some rpm packages
Did you logout after you enabled accessibility?
Yes I did. I am able to reproduce the problem every time the system is rebooted.
Added reference to GNOME bugzilla.
Created attachment 158019 [details] Nautilus crash 1. Default install on Xen paravirt. 2. boot into new system 3. login and enable accessibility 4. logout and login again 5. yum update; yum install dogtail 6. reboot 7. the nautilus error occured. 8. runnning sniff works now. Note: failing install was customized to include X and GNOME without applications, games etc. Maybe something was missing or not correctly installed. Will try to reproduce.
Created attachment 158027 [details] ks.cfg for a customized install where Dogtail breaks 1. Install Fedora 7 (using university mirror here) and customize packages 2. At the packages screen select ONLY: GNOME, X, Base 3. after install is complete install dogtail (yum output is) ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: dogtail noarch 0.6.1-1.fc7 fedora 171 k Installing for dependencies: pyspi x86_64 0.6.1-3.fc7 fedora 99 k xorg-x11-server-Xvfb x86_64 1.3.0.0-9.fc7 updates 1.6 M Transaction Summary ============================================================================= Install 3 Package(s) Update 0 Package(s) Remove 0 Package(s) 4. enable accessibility 5. reboot 6. run sniff and it breaks. Install logs are available if needed.
This looks like a bug in Pyrex. See http://lists.copyleft.no/pipermail/pyrex/2006-June/001876.html
*** Bug 252042 has been marked as a duplicate of this bug. ***
I grabbed an rpm of the latest pyrex to see if this issue was resolved but currently pyspi doesn't build against it ( see gnome bugzilla 423110 http://bugzilla.gnome.org/show_bug.cgi?id=423110) Also, there is an actual exception being thrown here, it is just not being raised properly due to the pyrex error. I filed a gnome bz against the actual problem with some more info and a workaround patch: http://bugzilla.gnome.org/show_bug.cgi?id=468636
Cole, thanks for looking into this. GNOME bug 468636 doesn't seem to be the only thing causing this problem; I applied your patch to pyspi there and I'm still getting: TypeError: exceptions must be strings, classes, or instances, not SpiException So it's not a complete workaround. The right way to do it would include your patch, but also to fix pyspi so it builds with the latest Pyrex, and get all that into F7. Then again, I've been working on a port of dogtail to python-at-spi, which are the new official bindings in at-spi SVN. I'm unsure so far if it will be done by F8, though. This will render pyspi obsolete, which is something I've been wanting to do since the beginning :)
(In reply to comment #10) > TypeError: exceptions must be strings, classes, or instances, not SpiException Not sure if this helps, but I believe as of Python 2.5 the language requires all exception objects to be either subclasses of type Exception or strings (which is deprecated).
Sorry for not updating this bug sooner. Pyrex in F7 just needs to be updated to at least 0.9.5.1a. It had a bug that caused it to break some exceptions in python 2.5. Then I can build the pyspi fix against it.
Fedora 8 has Pyrex 0.9.5.1a. Okay to close this?
Can't see Pyrex installed on my system but the crash doesn't happen anymore with the steps in comment #6
Okay, sounds like this can be closed then. Feel free to reopen if I'm wrong.
Alexander, Pyrex is only a BuildRequires of pyspi, so you won't have it installed unless you've been building pyspi.