[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Pate
From:       Shaheed Haque <srhaque () theiet ! org>
Date:       2012-06-30 22:52:42
Message-ID: CAHAc2jerPU=6nbRTfBHy1y3GJH79PW9U5WamnXAry+XG2eW+sA () mail ! gmail ! com
[Download RAW message or body]

I don't think the issue I see if I delete the link is the same as the
one you see. So, I have committed a change based on your traceback
which I hope will fix the crash you are hitting.I've no way to tell if
this helps or not though...

On 30 June 2012 21:57, Shaheed Haque <srhaque@theiet.org> wrote:
> I did a bit more testing. If I remove the link, Kate definitely fails
> to start for me like this:
> 
> srhaque> kate
> QDBusConnection: session D-Bus connection created before
> QCoreApplication. Application may misbehave.
> kate(3224)/Kate (Plugins): "Traceback (most recent call last):
> File "/usr/local/share/apps/kate/plugins/pate/kate/__init__.py",
> line 38, in <module>
> from PyKDE4.kate import Kate
> No module named kate
> Could not import kate"
> kate(3224)/Kate (Plugins): Could not initialise Pate. Ouch!
> kate(3224)/Kate (Plugins): "Traceback (most recent call last):
> File "/usr/local/share/apps/kate/plugins/pate/kate/__init__.py",
> line 38, in <module>
> from PyKDE4.kate import Kate
> No module named kate
> Could not import kate"
> Segmentation fault (core dumped)
> 
> Now, I add back the link like this, and it all works:
> 
> $ sudo ln -s /usr/local/lib/python2.7/dist-packages/PyKDE4/kate.so
> /usr/lib/python2.7/dist-packages/PyKDE4/kate.so
> 
> I also notice that Ubuntu sets sys.path to include *both* locations,
> so it is actually a bit weird that the link is needed:
> 
> > > > import sys
> > > > print sys.path
> ['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2',
> '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old',
> '/usr/lib/python2.7/lib-dynload',
> '/usr/local/lib/python2.7/dist-packages',
> '/usr/lib/python2.7/dist-packages',
> '/usr/lib/python2.7/dist-packages/PIL',
> '/usr/lib/python2.7/dist-packages/gst-0.10',
> '/usr/lib/python2.7/dist-packages/gtk-2.0',
> '/usr/lib/pymodules/python2.7']
> 
> 
> Question: do you have PyKDE4 installed?
> 
> 
> 
> 
> 
> On 30 June 2012 21:30, Shaheed Haque <srhaque@theiet.org> wrote:
> > OK, let's take this step by step. If you just run Python from the
> > command line, can you "import kate"? Try this:
> > 
> > 
> > srhaque> python
> > Python 2.7.3 (default, Apr 20 2012, 22:39:59)
> > [GCC 4.6.3] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> > > > > import kate
> > > > > 
> > 
> > 
> > On 30 June 2012 15:38, Dominik Haumann <dhaumann@kde.org> wrote:
> > > On Saturday, June 30, 2012 04:24:54 PM Dominik Haumann wrote:
> > > > On Wednesday, June 27, 2012 09:25:35 PM Shaheed Haque wrote:
> > > > > Hi Christoph,
> > > > > 
> > > > > If the file is installed to
> > > > > "/usr/local/lib/python2.7/dist-packages/PyKDE4/kate.so", then
> > > > > PYTHONPATH must include "/usr/local/lib/python2.7/dist-packages".
> > > > 
> > > > What about FindPythonLibrary.cmake:
> > > > # PYTHON_EXECUTABLE - The path and filename of the Python interpreter.
> > > > #
> > > > # PYTHON_SHORT_VERSION - The version of the Python interpreter found,
> > > > #     excluding the patch version number. (e.g. 2.5 and not 2.5.1))
> > > > #
> > > > # PYTHON_LONG_VERSION - The version of the Python interpreter found as a
> > > > human #     readable string.
> > > > #
> > > > # PYTHON_SITE_PACKAGES_INSTALL_DIR - this cache variable can be used for
> > > > installing
> > > > #                              own python modules. You may want to adjust
> > > > this to be the
> > > > #                              same as ${PYTHON_SITE_PACKAGES_DIR}, but
> > > > then admin
> > > > #                              privileges may be required for installation.
> > > > #
> > > > # PYTHON_SITE_PACKAGES_DIR - Location of the Python site-packages
> > > > directory. #
> > > > # PYTHON_INCLUDE_PATH - Directory holding the python.h include file.
> > > > #
> > > > # PYTHON_LIBRARY, PYTHON_LIBRARIES- Location of the Python library.
> > > > 
> > > > Maybe PYTHON_SITE_PACKAGES_INSTALL_DIR works?
> > > 
> > > ${PYTHON_SITE_PACKAGES_DIR} is the correct path.
> > > 
> > > Anyway, ater doing a symlink, it still crashes as follows:
> > > 
> > > Thread 1 (Thread 0xb4e9d710 (LWP 31342)):
> > > [KCrash Handler]
> > > #7  0xafda08c3 in PyList_Size () from /usr/lib/libpython2.7.so.1.0
> > > #8  0xafe85cd1 in Pate::ConfigPage::reloadPage (this=0x8ecbe58) at \
> > > kate/plugins/pate/src/plugin.cpp:293 #9  0xafe85965 in \
> > > Pate::ConfigPage::ConfigPage (this=0x8ecbe58, parent=0x92c8e80, \
> > > plugin=0x8ec34f0) at kate/plugins/pate/src/plugin.cpp:261 #10 0xafe8511e in \
> > > Pate::Plugin::configPage (this=0x8ec34f0, number=0, parent=0x92c8e80, name=0x0) \
> > > at kate/plugins/pate/src/plugin.cpp:152 #11 0xb7755389 in \
> > > KateConfigDialog::slotCurrentPageChanged (this=0x8e68388, current=0x8f24bf8, \
> > > before=0x8e50128) at kate/app/kateconfigdialog.cpp:301 [...]
> > > #15 0xb6f01d3d in KPageDialog::currentPageChanged(KPageWidgetItem*, \
> > > KPageWidgetItem*) () from /usr/lib/libkdeui.so.5 [...]
> > > #20 0xb6f03a1d in KPageWidget::currentPageChanged(KPageWidgetItem*, \
> > > KPageWidgetItem*) () from /usr/lib/libkdeui.so.5 [...]
> > > #25 0xb6f0298d in KPageView::currentPageChanged(QModelIndex const&, QModelIndex \
> > > const&) () from /usr/lib/libkdeui.so.5 [...]
> > > #36 0xb6a34f9b in QTreeView::setSelection(QRect const&, \
> > > QFlags<QItemSelectionModel::SelectionFlag>) () from /usr/lib/libQtGui.so.4 #37 \
> > > 0xb69e4234 in QAbstractItemView::mousePressEvent(QMouseEvent*) () from \
> > > /usr/lib/libQtGui.so.4 #38 0xb6a31954 in \
> > > QTreeView::mousePressEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4 [...]
> > > #62 0xb77647dd in KateMainWindow::showPluginConfigPage (this=0x83fcd78, \
> > > configpageinterface=0x0, id=0) at kate/app/katemainwindow.cpp:687 #63 \
> > > 0xb776474b in KateMainWindow::slotConfigure (this=0x83fcd78) at \
> > > kate/app/katemainwindow.cpp:675 
> > > Greetings
> > > Dominik
> > > _______________________________________________
> > > KWrite-Devel mailing list
> > > KWrite-Devel@kde.org
> > > https://mail.kde.org/mailman/listinfo/kwrite-devel
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic