maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Couldnot initialize python module (https://talk.maemo.org/showthread.php?t=37288)

HangLoose 2009-12-15 13:33

'Could not initialize python module' and 'No module named hello_world_home' after following tutorial
 
I am following this tutorial:
http://wiki.maemo.org/PyMaemo/HildonDesktop

When I launch Xephyr I see this error message:
Quote:

[sbox-FREMANTLE_X86: /usr/share/applications/hildon-home] > ImportError: No module named hello_world_home
hildon-home[12388]: GLIB WARNING ** default - Could not initialize Python module 'hello_world_home'
hildon-home[12388]: GLIB WARNING ** default - Error loading plugin: /usr/share/applications/hildon-home/hello_world_home5.desktop
ImportError: No module named hello_world_home
hildon-home[12388]: GLIB WARNING ** default - Could not initialize Python module 'hello_world_home'
hildon-home[12388]: GLIB WARNING ** default - Error loading plugin: /usr/share/applications/hildon-home/hello_world_home5.desktop
I even get the Widget to show in the "Add widget"-pane but it doesnt load.
I tried renaming the .desktop but still with no success, moving the .desktop out and in from it's folder but nothing.

Any ideas what I am doing wrong?

*The contents of each file, hello_world_home.py and hello_world_home.desktop, are the same as in the tutorial.*

mikkov 2009-12-15 13:38

Re: Couldnot initialize python module
 
Quote:

Originally Posted by HangLoose (Post 428924)
*The contents of each file, hello_world_home_py and hello_world_home.desktop, are the same as in the tutorial.*

is it really hello_world_home_py? Should be hello_world_home.py according to tutorial.

HangLoose 2009-12-15 13:42

Re: Couldnot initialize python module
 
oh i am sorry, i meant hello_world_home.py
was a typo when I was writing the post..

HangLoose 2009-12-15 14:24

Re: Couldnot initialize python module
 
So I tried manually compiling the source and I get this:
Quote:

[sbox-FREMANTLE_X86: /usr/lib/hildon-desktop] > python hello_world_home.py
Traceback (most recent call last):
File "hello_world_home.py", line 1, in <module>
import gtk
ImportError: No module named gtk
Then I tried installing python-gtk2 and python-runtime to solve the problem but to no avail.

Also I get this after a dpkg -l | grep python2.5 :

Quote:

ii python2.5 2.5.4-1maemo5 An interactive high-level object-oriented la
ii python2.5-minimal 2.5.4-1maemo5 A minimal subset of the Python language (ver
---------------------
Edit: I dont know what happened but after I compiled the program and re-started Xephyr it started working. Sorry I cant give more information about it.


All times are GMT. The time now is 21:17.

vBulletin® Version 3.8.8