[g-a-devel] Problems with Orca and Accerciser calling GConf client and at-spi2
- From: Piñeiro <apinheiro igalia com>
- To: Gnome-accessibility-devel gnome org
- Cc: gtk-devel-list gnome org
- Subject: [g-a-devel] Problems with Orca and Accerciser calling GConf client and at-spi2
- Date: Fri, 21 Jan 2011 17:22:49 +0100 (CET)
Some people during the last weeks (me included) can't use accerciser,
as it crashes with this error:
Traceback (most recent call last):
File "/opt/gnome3/bin/accerciser", line 51, in <module>
accerciser.main()
File "/opt/gnome3/lib/python2.7/site-packages/accerciser/__init__.py", line 34, in main
from accerciser import Main
File "/opt/gnome3/lib/python2.7/site-packages/accerciser/accerciser.py", line 27, in <module>
from accessible_treeview import *
File "/opt/gnome3/lib/python2.7/site-packages/accerciser/accessible_treeview.py", line 21, in <module>
from node import Node
File "/opt/gnome3/lib/python2.7/site-packages/accerciser/node.py", line 28, in <module>
cl.get_string('/apps/accerciser/highlight_border') or '#ff0000ff')
File "/opt/gnome3/lib/python2.7/site-packages/gi/types.py", line 40, in function
return info.invoke(*args)
TypeError: instance: Must be GConf.Client, not Client
I also have this problem on Orca, but as it normally uses
'try-except', it keeps working, although printing the same error (and
probably explaining why orca constantly goes to the command line).
What I understood from this traceback is that for any reason, it is
trying to use the new pygobject bindings to use gconf, but fails as
accerciser is not migrated yet.
But, it worked using this code on the command line:
>>> import gconf
>>> gconf.client_get_default().get_string('/apps/accerciser/highlight_border')
'#ff0000ff'
So I supposed that importing other module was causing the use of
pygobject introspection bindings. And I found that package:
>>> import pyatspi
>>> import gconf
>>> gconf.client_get_default().get_string('/apps/accerciser/highlight_border')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/gnome3/lib/python2.7/site-packages/gi/types.py", line 40, in function
return info.invoke(*args)
TypeError: instance: Must be GConf.Client, not Client
As problably you know, recently Mike Gorse started to use gobject
introspection for the at-spi2 python bindings, in his work related to
improve the performance.
So I guess that this is a problem caused for a mixed "old python
bindings-new python bindings" environment. No idea why this is still
working for other people. But stay tuned, as this could start to
happen to you soon.
One idea would be try to move the import order on accerciser, but as
far as I see, "import pyatspi" would be required during most of the
running time of accerciser, and "import gconf" just when you required
a property value.
So my question (please, if there are a best ml, point that, AFAIK,
there isn't a gobject introspection mailing list):
* There is a way to force to "load the old python bindings" when you
call "import gconf" ?
Of course, the workaroud would be go back to older pyatspi2 (so
at-spi2-core and at-spi2-atk) versions (not ideal, as the
accessibility community should test at-spi2).
BTW, I didn't report this as a bug, because I guess that the "do the
right thing" solution here would be do the gobject introspection
migration on accerciser [2]. Anyway, taking into account Eitan
comments related to Caribou [3], this doesn't seem a easy task.
BR
[1] http://live.gnome.org/Accessibility/GNOME3#pyatspi2_.28D-Bus.29
[2] http://live.gnome.org/GnomeGoals/AddGObjectIntrospectionSupport
[3] http://monotonous.org/2011/01/07/biannual-update/
===
API (apinheiro igalia com)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]