Bug 269710

Summary: pykdeuic4 broken in 4.6.x
Product: [Unmaintained] bindings Reporter: Kevin Kofler <kevin.kofler>
Component: pykdeAssignee: kde-bindings
Status: RESOLVED UNMAINTAINED    
Severity: crash CC: gokcen.eraslan, than
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kevin Kofler 2011-03-29 17:27:48 UTC
Version:           unspecified (using KDE 4.6.1) 
OS:                Linux

pykdeuic4 in kdebindings 4.6.x doesn't work with PyQt4 4.8.2 which it supposedly requires. See: https://bugzilla.redhat.com/show_bug.cgi?id=684419

Reproducible: Always

Steps to Reproduce:
1.create ui file with qt-designer
2.pykdeuic4 -o file.py file.ui


Actual Results:  
Traceback

Expected Results:  
No traceback

At first you get:

Traceback (most recent call last):
  File "/usr/bin/pykdeuic4", line 148, in <module>
    main()
  File "/usr/bin/pykdeuic4", line 145, in main
    processUI(args[0], output_filename, exe)
  File "/usr/bin/pykdeuic4", line 74, in processUI
    winfo = comp.compileUi(uifile, output)
TypeError: compileUi() takes exactly 4 arguments (3 given)

This is fixed in master, so it can be fixed by backporting:
https://projects.kde.org/projects/kde/kdebindings/pykde4/repository/revisions/3d84be0316c62136aa02f6a0a5482652d9582242

But that only gets you until the next traceback:

Traceback (most recent call last):
  File "/usr/bin/pykdeuic4", line 148, in <module>
    main()
  File "/usr/bin/pykdeuic4", line 145, in main
    processUI(args[0], output_filename, exe)
  File "/usr/bin/pykdeuic4", line 74, in processUI
    winfo = comp.compileUi(uifile, output, None)
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/Compiler/compiler.py",
line 119, in compileUi
    w = self.parse(input_stream)
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/uiparser.py", line 879, in
parse
    actor(elem)
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/uiparser.py", line 720, in
createUserInterface
    self.wprops.setProperties(self.toplevelWidget, elem)
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/properties.py", line 403,
in setProperties
    prop_value = self.convert(prop, widget)
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/properties.py", line 368,
in convert
    return func(prop[0], **args)
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/properties.py", line 148,
in _string
    prop.get('comment'), QtGui.QApplication.UnicodeUTF8)
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/Compiler/qtproxies.py",
line 238, in translate
    return i18n_string(text or "", disambig)
TypeError: __init__() takes exactly 2 arguments (3 given)

which doesn't appear to be fixed in master either.
Comment 1 Gökçen Eraslan 2011-03-30 08:19:42 UTC
What about that:

https://svn.pardus.org.tr/pardus/2011/devel/desktop/kde/base/kdebindings/files/fix-pykdeuic4.patch

First hunk changing the __init__ method is not included in the mainstream commit. Can you check that solves your problem? If so, I can commit it.
Comment 2 Than Ngo 2011-03-30 11:58:51 UTC
Gökcen, the fix resolves the reported issue, it can be committed in upstream. thanks
Comment 3 Andrew Crouthamel 2018-11-17 05:27:29 UTC
Hello, unfortunately this bug is being closed as unmaintained, per request of einar77.