Bug 326294

Summary: PyKDE, pykdeuic4: "TypeError: compileUi() takes exactly 5 arguments (4 given)"
Product: [Developer tools] bindings Reporter: totte <hans.tovetjarn>
Component: pykdeAssignee: kde-bindings
Status: RESOLVED FIXED    
Severity: normal CC: 0inkane, astrothayne, rdieter
Priority: NOR    
Version: 4.11.2   
Target Milestone: ---   
Platform: Chakra   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Sample foo.ui file

Description totte 2013-10-19 20:21:03 UTC
The compileUi() recently changed in PyQt, leading to it now requiring five arguments - it cannot be provided, however, in the current version of PyKDE. Setting the default value of the last argument to an empty string resolves the issue: `sed -i 's/winfo = comp.compileUi(uifile, output, None)/winfo = comp.compileUi(uifile, output, None, "")/g' /usr/bin/pykdeuic4`.

Reproducible: Always

Steps to Reproduce:
1. Run `pykdeuic4 -o foo.py foo.ui`
Actual Results:  
I got the error: "TypeError: compileUi() takes exactly 5 arguments (4 given)"

Expected Results:  
Compiled the foo.ui file without a hitch.
Comment 1 totte 2013-10-19 20:37:01 UTC
Created attachment 82955 [details]
Sample foo.ui file
Comment 2 Thayne 2013-12-14 04:29:05 UTC
I also get this exception whenever I attempt to run pykdeuic4 (either for python 2 or 3)
Comment 3 Fabian 2014-01-18 19:20:14 UTC
Git commit ce222ff83e583baad58045cfae4a7dd63e35f4b0 by Fabian Kosmale.
Committed on 18/01/2014 at 19:15.
Pushed by fabiank into branch 'KDE/4.12'.

Add further parameter to compileUI if PyQt is newer than 4.10.0

As the method signature changed in 4.10.0, one needs to pass an
addional parameter; the empty string is a good default value
To prevent breaking pykde for older PyQt versions, the old signature
is called if the version is < 4.10.0
REVIEW: 115082

M  +7    -1    tools/pykdeuic4/pykdeuic4.py

http://commits.kde.org/pykde4/ce222ff83e583baad58045cfae4a7dd63e35f4b0