Bug 1480727 - Can't import PyKDE4.kdeui
Can't import PyKDE4.kdeui
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: pykde4 (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ngo Than
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-11 14:58 EDT by Jason Tibbitts
Modified: 2017-11-15 15:08 EST (History)
4 users (show)

See Also:
Fixed In Version: pykde4-4.14.3-18.fc26
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-11-15 15:08:45 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jason Tibbitts 2017-08-11 14:58:00 EDT
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-11 21:01:17 EDT
Confirmed, it affects both python(2) and python3 bindings similarly.
Comment 2 Piergiorgio Sartor 2017-11-03 16:02:23 EDT
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...

Thanks,

bye,

pg
Comment 3 Rex Dieter 2017-11-03 16:20:18 EDT
there is no eta unfortunately, the problem is not yet fully understood.
Comment 4 Jason Tibbitts 2017-11-03 17:50:58 EDT
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 19:41:39 EDT
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:

https://src.fedoraproject.org/rpms/qgis/raw/86062bf7a0fff3fea03fe33685df1ee302d4e3d6/f/qgis-2.18.10-sip.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-03 20:15:07 EDT
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 18:03:43 EDT
Hi all,

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

bye,

pg
Comment 8 Fedora Update System 2017-11-11 10:10:48 EST
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 15:08:45 EST
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.