[Kde-bindings] [Bug 217537] New: pykdeuic4 doesn't work with PyQt 4.6.2

Michael Donaghy kde at sdonag.plus.com
Sun Dec 6 08:20:19 UTC 2009


https://bugs.kde.org/show_bug.cgi?id=217537

           Summary: pykdeuic4 doesn't work with PyQt 4.6.2
           Product: bindings
           Version: unspecified
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kde-bindings at kde.org
        ReportedBy: kde at sdonag.plus.com


Version:            (using KDE 4.3.4)
Compiler:          gcc (Gentoo 4.4.2 p1.0) 4.4.2 
OS:                Linux
Installed from:    Gentoo Packages

When I try and build a project that uses pykdeuic4, it fails with an error like
the following:
md401 at arcueid ~/pants/sakusen $ make -C kiai
make: Entering directory `/home/md401/pants/sakusen/kiai'
pykdeuic4 -o connectDialog.py ../kiai/connectDialog.ui
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)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/Compiler/compiler.py",
line 66, in compileUi
    w = self.parse(input_stream)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 777, in
parse
    actor(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 623, in
createUserInterface
    self.wprops.setProperties(self.toplevelWidget, elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/properties.py", line 271,
in setProperties
    getattr(widget, "set%s%s" % (ascii_upper(propname[0]),
propname[1:]))(self.convert(prop, widget))
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/Compiler/qtproxies.py",
line 90, in __call__
    ", ".join(map(obj_to_argument, args)))
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/Compiler/qtproxies.py",
line 25, in obj_to_argument
    arg = str(obj)
  File "/usr/bin/pykdeuic4", line 42, in __str__
    return "kdecore.i18n(\"%s\")" % (self.escape(self.string),)
AttributeError: 'kde_i18n_string' object has no attribute 'escape'
make: *** [connectDialog.py] Error 1
make: *** Deleting file `connectDialog.py'
make: Leaving directory `/home/md401/pants/sakusen/kiai'

This appears to be because "escape" is no longer a method on
qtproxies.i18n_string, but now just a function in the qtproxies module.
Changing line 42 of pykdeuic4 from
        return "kdecore.i18n(\"%s\")" % (self.escape(self.string),)
to
        return "kdecore.i18n(\"%s\")" % (qtproxies.escape(self.string),)
removed the error and gave me a pykdeuic4 that functioned as expected.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Kde-bindings mailing list