[PyQt] Importing marble fails
I compiled one of the newer marble commits, 10c910a9cae3c4e8eb9be442d80125b7e7338e67, and copied the marble.so into /usr/lib/python2.7/dist-packages/PyKDE4 and when I go to import marble within a python interpreter, this error is given:http://paste.kde.org/194432/ The error is mentioned in swig's docs: http://www.swig.org/Doc1.3/Python.htmlThis error is almost always caused when a bad name is given to the shared object file. For example, if you created a file example.so instead of _example.so you would get this error. Alternatively, this error could arise if the name of the module is inconsistent with the module name supplied with the %module directive. Double-check the interface to make sure the module name and the shared object filename match. Another possible cause of this error is forgetting to link the SWIG-generated wrapper code with the rest of your application when creating the extension module. Maybe it's one of the latter causes? -- Heath Matlock +1 256 274 4225 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Importing marble fails
On Sat, Jan 28, 2012 at 9:47 AM, David Boddie da...@boddie.org.uk wrote: On Sat, 28 Jan 2012 02:12:19 -0600, heathmatlock wrote: I compiled one of the newer marble commits, 10c910a9cae3c4e8eb9be442d80125b7e7338e67, and copied the marble.so into /usr/lib/python2.7/dist-packages/PyKDE4 and when I go to import marble within a python interpreter, this error is given:http://paste.kde.org/194432/ Are you sure that the module.so file contains the Python bindings for Marble? If you try to import a regular C/C++ library into Python, you will get the same error. How did you configure the Marble build? I'm not sure that the file contains the Python bindings, it was just the best guess. This is what was used to configure marble: ~/Devel/build/marble$ cmake ../../src/marble/ -DEXPERIMENTAL_PYTHON_BINDINGS=TRUE -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=/home/heath/Devel/install/marble/ -- Heath Matlock +1 256 274 4225 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Importing marble fails
I removed marble.so and libmarblewidget.so from /usr/lib/python2.7/dist-packages/PyKDE4/ then configured and compiled marble without specifying an install directory and installed as a root user to system defaults. This time marble wasn't even found as something to import, so I did updatedb locate marble.so and I found this: /usr/local/lib/python2.7/site-packages/PyKDE4/marble.so I then did this: http://paste.kde.org/194852/ And as you can see it wasn't finding the marble module. I'm guessing that maybe it still has something to do with paths. On Sat, Jan 28, 2012 at 10:53 AM, heathmatlock heathmatl...@gmail.com wrote: On Sat, Jan 28, 2012 at 9:47 AM, David Boddie da...@boddie.org.uk wrote: On Sat, 28 Jan 2012 02:12:19 -0600, heathmatlock wrote: I compiled one of the newer marble commits, 10c910a9cae3c4e8eb9be442d80125b7e7338e67, and copied the marble.so into /usr/lib/python2.7/dist-packages/PyKDE4 and when I go to import marble within a python interpreter, this error is given:http://paste.kde.org/194432/ Are you sure that the module.so file contains the Python bindings for Marble? If you try to import a regular C/C++ library into Python, you will get the same error. How did you configure the Marble build? I'm not sure that the file contains the Python bindings, it was just the best guess. This is what was used to configure marble: ~/Devel/build/marble$ cmake ../../src/marble/ -DEXPERIMENTAL_PYTHON_BINDINGS=TRUE -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=/home/heath/Devel/install/marble/ -- Heath Matlock +1 256 274 4225 -- Heath Matlock +1 256 274 4225 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] [Marble-devel] Marble with python bindings
Hi Tony, Marble functions aren't currently supported by PyKDE, it's something Simon, the PyKDE maintainer, might be working on, and if not, I'll gladly put forth the time to fix this. I sent an email to Simon a few mins ago and then saw your email, I'll let you know what he says if he doesn't respond to this thread. On Sun, Jan 8, 2012 at 4:25 PM, Tony Peña emperor...@gmail.com wrote: Hi list, this is part of my app and as all can see works in qtdesigner http://i.imgur.com/sNA50.png I'm try to develop an app and I want to use marble, but when I compiled, only can get the QWidget marble for QtDesigner, because when i put the marble into my app in the QTabWidget, all fine. and save but, i get this pyuic4 QtUI/MainWindow_UI.ui modules/MainWindow_UI.py Unknown Qt widget: Marble.MarbleWidget I read some mail archives, not is with pyui4 else pykdeuic4 and with that got this errors pykdeuic4 QtUI/MainWindow_UI.ui modules/MainWindow_UI.py Traceback (most recent call last): File /usr/bin/pykdeuic4, line 156, in module main() File /usr/bin/pykdeuic4, line 153, in main processUI(source_ui, output_filename, exe) File /usr/bin/pykdeuic4, line 91, in processUI winfo = comp.compileUi(uifile, output, None) File /usr/lib/python2.7/dist-packages/PyQt4/uic/Compiler/compiler.py, line 119, in compileUi w = self.parse(input_stream) File /usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py, line 927, in parse actor(elem) File /usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py, line 770, in createUserInterface self.traverseWidgetTree(elem) File /usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py, line 748, in traverseWidgetTree handler(self, child) File /usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py, line 224, in createWidget self.traverseWidgetTree(elem) File /usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py, line 748, in traverseWidgetTree handler(self, child) File /usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py, line 224, in createWidget self.traverseWidgetTree(elem) File /usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py, line 748, in traverseWidgetTree handler(self, child) File /usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py, line 224, in createWidget self.traverseWidgetTree(elem) File /usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py, line 748, in traverseWidgetTree handler(self, child) File /usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py, line 215, in createWidget self.stack.push(self.setupObject(widget_class, parent, elem)) File /usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py, line 176, in setupObject obj = self.factory.createQObject(clsname, name, args, is_attribute) File /usr/lib/python2.7/dist-packages/PyQt4/uic/objcreator.py, line 108, in createQObject raise NoSuchWidgetError(classname) PyQt4.uic.exceptions.NoSuchWidgetError: Unknown Qt widget: Marble.MarbleWidget other thing is this when I type at ipython In [1]: from PyKDE4.marble import * --- ImportError Traceback (most recent call last) ipython-input-1-9cb3cfbadbf9 in module() 1 from PyKDE4.marble import * ImportError: No module named marble so, what have to do? to can going devel? -- Antonio Peña Secure email with PGP 0x8B021001 available at http://pgp.mit.edu Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001 ___ Marble-devel mailing list marble-de...@kde.org https://mail.kde.org/mailman/listinfo/marble-devel -- Heath Matlock +1 256 274 4225 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Marble app
Is there an equivalent for QtCore/QDebug? When writing a runner for marble, you have directives at the top, e.g.: #include marble/MarbleWidget.h#include marble/MarbleModel.h etc. How you would call MarbleWidget or MarbleModel from PyKDE? -- Heath Matlock +1 256 274 4225 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] What's wrong with the tutorial on techbase?
Any ideas on why this tutorial isn't working? http://techbase.kde.org/Development/Tutorials/Plasma/PythonRunner At the top in the build section, it says, For this example, ourpackage will be called 'runner_msgbox'. But then in themetadata.desktop file, it has this line:X-KDE-PluginInfo-Name=msgbox_runner In the function definition on line 7 of the code, it's missing acolon, I fixed this in my code, and it still doesn't work. I thenrenamed the directory to msgbox_runner, deleted the installed program,and reinstalled. Still doesn't work. Others have verified this in#kde-devel on Freenode. -- Heath Matlock +1 256 274 4225 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] What's wrong with the tutorial on techbase?
On Thu, Dec 29, 2011 at 7:15 PM, heathmatlock heathmatl...@gmail.com wrote: Any ideas on why this tutorial isn't working? http://techbase.kde.org/Development/Tutorials/Plasma/PythonRunner At the top in the build section, it says, For this example, ourpackage will be called 'runner_msgbox'. But then in themetadata.desktop file, it has this line:X-KDE-PluginInfo-Name=msgbox_runner In the function definition on line 7 of the code, it's missing acolon, I fixed this in my code, and it still doesn't work. I thenrenamed the directory to msgbox_runner, deleted the installed program,and reinstalled. Still doesn't work. Others have verified this in#kde-devel on Freenode. -- Heath Matlock +1 256 274 4225 The runner isn't even starting:http://paste.kde.org/179432/raw/ -- Heath Matlock +1 256 274 4225 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt