![]() |
D-Bus error: Not enough memory?? Weird compiling python error.
I am following this tutorial:
http://wiki.maemo.org/PyMaemo/UsingPythonInMaemo When I try to compile this code: Code:
#!/usr/bin/env python2.5 Quote:
|
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Try putting a "run-standalone.sh" before python2.5 in your command line.
I would recommend against that tutorial, it is out of date. Start here: http://wiki.maemo.org/PyMaemo Then go here: http://wiki.maemo.org/PyMaemo/UITutorial |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
I did the above and also ran the below commands as per the wiki in my ARMEL target
X86: ~] > eval $(dbus-launch --sh-syntax) X86: ~] > export BUS_SESSION_BUS_ADDRESS X86: ~] > export DBUS_SESSION_BUS_PID corrected a typo in the wiki export BUS_SESSION_BUS_ADDRESS should be export DBUS_SESSION_BUS_ADDRESS I think. Anyways I still get this error could you help ? [sbox-FREMANTLE_ARMEL: ~] > run-standalone.sh python2.5 py.py process 24390: 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 24390: 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[24390]: GLIB ERROR ** default - Not enough memory to set up DBusConnection for use with GLib aborting... qemu: uncaught target signal 6 (Aborted) - core dumped [sbox-FREMANTLE_ARMEL: ~] > cat py.py import gtk import hildon [sbox-FREMANTLE_ARMEL: ~] > |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Maybe this'll work, I don't know:
Switch to the X86 target, fire up Xephyr as per the Wiki instructions, run af-sb-init.sh start, don't start up D-Bus manually, and, finally, run-standalone.sh python2.5 py.py |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Quote:
In anycase, does that mean I cannot use hildon bindings in python on the ARMEL target ? |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Quote:
|
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Quote:
I tried that in the X86 target , but hadnt worked coz maybe the repositories werent there in my apt/source.list. But it had worked for ARMEL target and I could download with the same list of repositories. this is my /etc/apt/sources.list deb http://repository.maemo.org/ fremantle/sdk free non-free deb-src http://repository.maemo.org/ fremantle/sdk free deb http://repository.maemo.org/ fremantle/tools free non-free deb-src http://repository.maemo.org/ fremantle/tools free But my main intention is to develop for ARMEL and I keep getting the above error. EDIT:: added the extras-devel repository to get this result [sbox-FREMANTLE_X86: ~] > fakeroot apt-cache search python2.5-hildon python-hildon - Python bindings for Hildon Framework. python-hildondesktop - Python bindings for libhildondesktop |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
same error in X86 target also
[sbox-FREMANTLE_X86: ~] > run-standalone.sh ./py.py process 27248: 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 27248: 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[27248]: GLIB ERROR ** default - Not enough memory to set up DBusConnection for use with GLib aborting... /usr/bin/run-standalone.sh: line 11: 27248 Aborted (core dumped) "$@" |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Yes, install "python-hildon" then.. my fault (it was called python2.5-hildon some time ago). As Python is a scripting language, and you don't compile python scripts in the traditional sense (the Python interpreter does compile the source file into Python bytecode - *.pyc and *.pyo files - but these are platform-independent).
I'm also developing Python applications for the N900, and do all my testing in the SDK with the X86 target. I also do lots of testing directly on-device, as I just need to rsync my source tree to the device and test it using SSH or the X Terminal - no compiling needed :) In short: Unless you are writing Python C extension modules, you should not need to care about the ARMEL target, and the X86 target will give you less headache. Do a "fakeroot apt-get install python-hildon" in Scratchbox, and don't forget to always call Python with "python2.5", as "python" will most likely use the Scratchbox-provided python 2.3. |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Quote:
|
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Quote:
had to start the hildon desktop using af-sb-init.sh thanks thp. So, until we can start the hildon destop in ARMEL maybe we cant use hildon python bindings in ARMEL ? maybe thats the issue :confused: i really want to be able to use it there for my purpose lies in ARMEL :( |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Quote:
Code:
run-standalone.sh python2.5 <script.py> Daniel |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Quote:
|
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Quote:
Daniel |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
thanks Daniel.
do you think it would run on the N900 itself ? Im keen to use the python-hildon bindings to test it on the N900 , as I have extensions compiled in ARM that I would like to use, is this possible ? any chance you have tried using the hildon bindings on maemo ? |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Quote:
Daniel |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Quote:
Was going through some swig documentation for the same. Anyways my intention was to use python scripts to create apps based on QT mobility api's. Ive tried the apps using c++ without hildonizing. For a start I wanted to write a python script to call an existing app Ive created batlevel_1.0-3 ( extras-devel ) which uses qtsysteminfo. All this is currently compiled in ARM so I will need to make extensions for them to use them in my python script. Hope this is the right direction. thanks |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
@krk969:
To test your Python applications, you have two options: either you test them on the X86 target, or you test on the N900 directly. Testing on the ARMEL target will almost always not work. Now you said your application has a custom extension, is that right? If those are real (*.so) extensions (written in C) and not just plain Python modules (*.py), you have to compile them on the x86 target to be able to test them on your desktop. Otherwise you should only compile them on the ARMEL target, install the generated packages on the N900 and test them there. |
Re: D-Bus error: Not enough memory?? Weird compiling python error.
Is it possible to package python application without scratchbox.
I have a python program in one py file. It run's just fine in N900 via command "python filename.py" But if I want to pacage it for uploading to garage it gave me an error. See this thread: http://talk.maemo.org/showthread.php?p=458283 |
All times are GMT. The time now is 10:45. |
vBulletin® Version 3.8.8