Bug 1480727 - Can't import PyKDE4.kdeui
Summary: Can't import PyKDE4.kdeui
Alias: None
Product: Fedora
Classification: Fedora
Component: pykde4
Version: 26
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2017-08-11 18:58 UTC by Jason Tibbitts
Modified: 2017-11-15 20:08 UTC (History)
4 users (show)

Fixed In Version: pykde4-4.14.3-18.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-11-15 20:08:45 UTC
Type: Bug

Attachments (Terms of Use)

Description Jason Tibbitts 2017-08-11 18:58:00 UTC
It appears that something has changed in PyQt4 which prevents PyKDE4 from working properly.  Just doing "import PyKDE4.kdeui" will fail:

ld40:~❯ python3
Python 3.6.2 (default, Jul 19 2017, 13:09:21)
[GCC 7.1.1 20170622 (Red Hat 7.1.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyKDE4.kdeui
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: PyKDE4.kdeui cannot import type 'QList<QPair<QString,QString> >' from PyQt4.QtCore

I'm having no luck figuring out where this is coming from; I suspect it's down in the compiled C code generated by the bindings.

Comment 1 Rex Dieter 2017-08-12 01:01:17 UTC
Confirmed, it affects both python(2) and python3 bindings similarly.

Comment 2 Piergiorgio Sartor 2017-11-03 20:02:23 UTC
Hi all,

so it is confirmed, but when can we expect a solution?

Have some code not running any more exactly and precisely for this reason...




Comment 3 Rex Dieter 2017-11-03 20:20:18 UTC
there is no eta unfortunately, the problem is not yet fully understood.

Comment 4 Jason Tibbitts 2017-11-03 21:50:58 UTC
I wonder if other distros are having the same issue, and whether any of them has had any luck with a solution.  Searching for variations of this particular error doesn't lead to anything which isn't Fedora-related, which makes me concerned that this issue is somehow Fedora-specific.

Comment 5 Jason Tibbitts 2017-11-03 23:41:39 UTC
Looking for similar "cannot import type" errors, I se that qgis had a similar problem which appears to have gone after a SIP update.  But for a while, Fedora carried this patch:


Unfortunately I'm now quite out of my depth and I have no idea if some similar manual declaration of "QList<QPair<QString,QString> >" would be needed.  In the pykde4 source, those sip files all seem to be autogenerated.

And, finally, I gave this a try on a rawhide VM:

test-rawhide:~❯ python3
Python 3.6.3 (default, Oct  9 2017, 12:07:50)
[GCC 7.2.1 20170829 (Red Hat 7.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyKDE4.kdeui

So, uh, I don't know.  That has python3-pykde4-4.14.3-20.fc27.x86_64 and python3-3.6.3-2.fc28.x86_64.  Will have to set up an F27 box next week to experiment, but maybe whatever this was is fixed by some other package update, or maybe the sup rebuild that happened in 4.14.3-18 (just after the last F26 package).

Comment 6 Jason Tibbitts 2017-11-04 00:15:07 UTC
Sorry to spam, but I noticed that an updated set of packages was available in F26 updates-testing, so I did a big update and I'm happy to report that it's all working properly now.

You still have to hack around the lack of DLFCN.py but that's a separate bug (https://bugzilla.redhat.com/show_bug.cgi?id=1456075) and I'll post a suggested fix there tomorrow.

Comment 7 Piergiorgio Sartor 2017-11-04 22:03:43 UTC
Hi all,

I can confirm, the updates-testing of pykde4 solves my problem too.



Comment 8 Fedora Update System 2017-11-11 15:10:48 UTC
PyQt4-4.12.1-1.fc26 pykde4-4.14.3-18.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-7cd5dfcd05

Comment 9 Fedora Update System 2017-11-15 20:08:45 UTC
PyQt4-4.12.1-1.fc26, pykde4-4.14.3-18.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.