Bug 311600 - PyKDE4 kate dynamic module does not define init function
Summary: PyKDE4 kate dynamic module does not define init function
Status: RESOLVED UNMAINTAINED
Alias: None
Product: bindings
Classification: Developer tools
Component: pykde (show other bugs)
Version: 4.9
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-12 23:35 UTC by Davide Rossi
Modified: 2018-11-17 05:29 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Rossi 2012-12-12 23:35:45 UTC
I compiled Pate, a kate plugin for python developers. It's built on top of SIP, PyQt4 and PyKDE.
When correctly installed kate try to load it but prints out this on start:

Traceback (most recent call last):
  File "/usr/share/apps/kate/plugins/pate/kate/__init__.py", line 15, in <module>                                              
    from PyKDE4.kate import Kate                                                                                               
ImportError: dynamic module does not define init function (initkate)                                                           
Could not import the kate module. Dieing.                                                                                      
Could not initialise Pate. Ouch!

And the same happen if i launch python from command line and i type either
from PyKDE4 import kate  OR  from PyKDE4.kate import Kate.
This doesn't happen with every other PyKDE4 submodule (i tried them all: kdecore, kdeui, plasma, solid, soprano etcetera...). I'm no expert and i can't figure out what's going wrong. 

Any guess?

Reproducible: Always

Steps to Reproduce:
1. python2.7
2. >>> from PyKDE4 import kate
or (as plugin does):
3. >>> from PyKDE4.kate import Kate
Actual Results:  
ImportError: dynamic module does not define init function (initkate)

Expected Results:  
Module kate imported on python namespace.

This is the relevant software installed on my gentoo system through official portage repository:
- dev-python/sip-4.14.2
- dev-python/PyQt4-4.9.6
- kde-base/pykde4-4.9.3
Comment 1 Evstifeev Roman 2013-01-18 13:01:31 UTC
I can confirm this bug on openSUSE 12.2 with KDE 4.9.5
Comment 2 Marcelo Jimenez 2014-04-25 17:19:49 UTC
Confirmed on openSUSE 12.3, kde 4.10.5
I have followed these instructions:
http://kate-editor.org/get-it/

Got this on the console:
kate(14371)/Kate (Plugins): "Traceback (most recent call last):
  File "/home/mroberto/kde/usr/share/apps/kate/plugins/pate/kate/__init__.py", line 42, in <module>
    from .api import *
  File "/home/mroberto/kde/usr/share/apps/kate/plugins/pate/kate/api.py", line 30, in <module>
    from PyKate4.kate import Kate
ImportError: dynamic module does not define init function (initkate)
Could not import kate"
Comment 3 Marcelo Jimenez 2014-04-25 19:59:39 UTC
For the record, downgrading

python-qt4-utils-4.10.4-130.1.x86_64

to 

python-qt4-utils-4.9.6-3.2.2.x86_64

And recompiling everything solved the issue.
Comment 4 Alexandr Zamaraev (aka Tonal) 2014-10-06 05:13:06 UTC
Confirmed on Kubuntu 14.04 with backport ppa
KDE 4.14.1
Kate 3.14.1

Console output:
kate(14053)/Kate (Plugins): "Traceback (most recent call last):
  File "/usr/share/kde4/apps/kate/plugins/pate/kate/__init__.py", line 42, in <module>
    from .api import *
  File "/usr/share/kde4/apps/kate/plugins/pate/kate/api.py", line 30, in <module>
    from PyKate4.kate import Kate
ImportError: dynamic module does not define init function (initkate)
Could not import kate"
Comment 5 Jasper 2014-10-14 21:40:04 UTC
Problem persists in Ubunt 14.10:
Kate: 3.14.1
Kdev Platform: 4.14.1
python-kdev4 (from ubuntu) 4:4.14.1-0ubuntu1
python3-pykde4 python3-pykde4 4:4.14.1-0ubuntu1
python-qt4     4.11.1+dfsg-1
Comment 6 pbhj 2014-10-29 18:15:19 UTC
I get the following when running kate from term:

:~$ kate
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
kate(7195)/Kate (Plugins): "ImportError: No module named jedi
Could not import jedi" 
kate(7195)/Kate (Plugins): "Traceback (most recent call last):
  File "/usr/share/kde4/apps/kate/plugins/pate/kate/__init__.py", line 42, in <module>
    from .api import *
  File "/usr/share/kde4/apps/kate/plugins/pate/kate/api.py", line 30, in <module>
    from PyKate4.kate import Kate
ImportError: dynamic module does not define init function (initkate)
Could not import kate" 
kate(7195)/Kate (Plugins): Could not get item string pate _pateUnloading 
kate(7195)/Kate (Plugins): Failed to resolve pate _pateUnloading 

KDE 4.14.1 on Kubuntu 14.04; kate 4:4.14.1-0ubuntu1~ubuntu14.04~ppa1 (same version for python-kde4, etc.).
Comment 7 Andrew Crouthamel 2018-11-12 02:54:14 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Andrew Crouthamel 2018-11-17 05:29:48 UTC
Hello, unfortunately this bug is being closed as unmaintained, per request of einar77.