maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   python-hildon and Fremantle Beta2 SDK (https://talk.maemo.org/showthread.php?t=30546)

BrentDC 2009-07-28 22:57

python-hildon and Fremantle Beta2 SDK
 
When try to import hildon from my beta2 sdk prompt, I get this:

Code:

[sbox-FREMANTLE_X86: ~/quickclip-.5/viewer] > python2.5
Python 2.5.2 (r252:60911, May 23 2009, 01:31:38)
[GCC 4.2.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hildon
Xlib:  extension "Generic Event Extension" missing on display ":2.0".
Xlib:  extension "Generic Event Extension" missing on display ":2.0".
Xlib:  extension "Generic Event Extension" missing on display ":2.0".
Xlib:  extension "Generic Event Extension" missing on display ":2.0".
Xlib:  extension "Generic Event Extension" missing on display ":2.0".
process 9430: arguments to dbus_connection_get_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5757.
This is normally a bug in some application using the D-Bus library.
process 9430: arguments to dbus_connection_set_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5721.
This is normally a bug in some application using the D-Bus library.
python2.5[9430]: GLIB ERROR ** default - Not enough memory to set up DBusConnection for use with GLib
aborting...
Aborted (core dumped)
[sbox-FREMANTLE_X86: ~/quickclip-.5/viewer] >

I have been extremeley busy lately, so maybe I missed something important on different steps that needed to be taken to get python working in the sdk, 'cause it was working fine in beta 1.

Any help would be appreciated... Thanks.

danielwilms 2009-07-29 06:43

Re: python-hildon and Fremantle Beta2 SDK
 
Hi BrentDC,

you can get rid of the dbus error by following this before starting python.

The Xlib error I don't know. I cannot reproduce it. How did you upgrade from beta to beta 2? Perhaps something went wrong there? As the display variable is shown I guess you've started the af-sb-init script?

Cheers Daniel

Jaffa 2009-07-29 10:34

Re: python-hildon and Fremantle Beta2 SDK
 
I've not seen that, however if you are doing Python on Fremantle; be aware of:
#4782: osso.Context causes segmentation fault
I've worked around this as follows:

Code:

try:
  import osso
  has_osso = True
  try:
    f = open('/etc/maemo_version', 'r')
    if (f.readline().startswith('5.0')):
      print "*** Disabling OSSO functionality due to Maemo 5 bug #4782"
      has_osso = False
  except:
    pass
except ImportError:
  has_osso = False


BrentDC 2009-07-29 16:04

Re: python-hildon and Fremantle Beta2 SDK
 
Quote:

Originally Posted by danielwilms (Post 307409)
Hi BrentDC,

you can get rid of the dbus error by following this before starting python.

That seems to work OK when using Python in the terminal or even a program, but when I prefix my application with run-standalone.sh, I get the same problem.

Quote:

The Xlib error I don't know. I cannot reproduce it. How did you upgrade from beta to beta 2? Perhaps something went wrong there? As the display variable is shown I guess you've started the af-sb-init script?

Cheers Daniel
I think I've always gotten the Xlib error even on Beta 1, and everything has worked fine, so I'm not too concerned about that one.

BrentDC 2009-07-29 16:05

Re: python-hildon and Fremantle Beta2 SDK
 
Quote:

Originally Posted by Jaffa (Post 307457)
I've not seen that, however if you are doing Python on Fremantle; be aware of:
#4782: osso.Context causes segmentation fault
I've worked around this as follows:

Code:

try:
  import osso
  has_osso = True
  try:
    f = open('/etc/maemo_version', 'r')
    if (f.readline().startswith('5.0')):
      print "*** Disabling OSSO functionality due to Maemo 5 bug #4782"
      has_osso = False
  except:
    pass
except ImportError:
  has_osso = False


Thanks for the tip. :)

BrentDC 2009-07-29 16:46

Re: python-hildon and Fremantle Beta2 SDK
 
Strike post #4, everything seems to be working OK now (have no idea what changed, though).


All times are GMT. The time now is 09:20.

vBulletin® Version 3.8.8