Reply
Thread Tools
Posts: 78 | Thanked: 6 times | Joined on Dec 2007
#1
I'm having trouble with a few python applications that apparently use gconf. If I run "python"
and then type from gnome import gconf
I get ImportError: cannot import gconf.

This is the same error I get from a few applications that use python. Gconf is there when I check with dpkg, but something isn't configured right. Any suggestions?
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#2
If you're doing this from scratchbox, make sure to use python2.5 (or set SBOX_REDIRECT_IGNORE). Running "python" invokes scratchbox's internal version which isn't really meant to be used by much else except for scratchbox.
 
Posts: 6 | Thanked: 6 times | Joined on Nov 2007
#3
On Maemo you've to run

import gnome.gconf
 
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#4
Some installations of pymaemo are broken, and the gconf module cannot be imported at all.
For these cases I've written a simple workaround gconf module replacement using gconftool-2, which can be used if "import gnome.gconf" fails:

Code:
try:
    import gnome.gconf as gconf
except:
    import gconftool as gconf
It's not feature-complete, though, but good enough for basic tasks.

https://garage.maemo.org/plugins/scm...ox&view=markup
 

The Following User Says Thank You to pycage For This Useful Post:
Posts: 78 | Thanked: 6 times | Joined on Dec 2007
#5
I think that my python2.5 environment is missing some things now for some unknown reason. Is there any way to fix this environment without reflashing the system with the latest OS? I'm seeing python2.5-gtk2 as missing for example when I want to upgrade or install some software.
 
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#6
You should install python2.5-runtime. This metapackage will install the most common Python modules (including python-gtk).
 
Posts: 78 | Thanked: 6 times | Joined on Dec 2007
#7
I tried doing an apt-get install python2.5-runtime and nothing was installed as it thinks I have the newest version. Can I uninstall it and reinstall it safely? It looks like if I remove, it will remove a bunch of programs in addition, all of which will have to be reinstalled. Removing python2.5-runtime would cause these to be removed too: "easy mcalendar, mediabox mediabox-internet-radio mediabox-worldtv mnotes python-dateutil quicknote rapier and usbcontrol" in addition to python2.5-runtime. I assume then that I would have to reinstall all of these programs after reinstalling python2.5-runtime
 
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#8
If all those applications you mention are working, then you definitely have python2.5-gtk2 installed.
 
Posts: 78 | Thanked: 6 times | Joined on Dec 2007
#9
Some of them including rapier are not working. Some do.
 
Posts: 78 | Thanked: 6 times | Joined on Dec 2007
#10
I uninstalled python2.5-runtime and it uninstalled the above mentioned apps. I then installed python2.5-runtime and the apps, but rapier still fails on a gconf import. Labyrinth is another application that fails on gconf import in the same way as rapier. I can only conclude that uninstalling python2.5-runtime and reinstalling did nothing to deal with the problem I'm having.
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:16.