[PyKDE] pyuic pyqt4 string conversion problem
myselfhimself at free.fr
myselfhimself at free.fr
Wed Apr 26 15:24:41 BST 2006
Hi.
I have had this bug which I think comes from a unicode "string"
the text that trying to be translated contained a french "é".
I have hacked the thing with a prop.text.encode("UTF-8") to solve the problem.
Jonathan
Traceback (most recent call last):
File "C:\python24\Lib\site-packages\PyQt4\uic\pyuic.py", line 38, in ?
widget = Loader.loadUi(args[1])
File "C:\python24\lib\site-packages\PyQt4\uic\Loader\__init__.py", line 5, in
loadUi
return up.loadUi(uifile, toplevel_instance)
File "C:\python24\lib\site-packages\PyQt4\uic\Loader\loader.py", line 27, in l
oadUi
return self.parse(filename)
File "C:\python24\lib\site-packages\PyQt4\uic\uiparser.py", line 387, in parse
actor(elem)
File "C:\python24\lib\site-packages\PyQt4\uic\uiparser.py", line 271, in creat
eUserInterface
self.traverseWidgetTree(elem)
File "C:\python24\lib\site-packages\PyQt4\uic\uiparser.py", line 261, in trave
rseWidgetTree
handler(self, child)
File "C:\python24\lib\site-packages\PyQt4\uic\uiparser.py", line 132, in creat
eWidget
self.stack.push(self.setupObject(widgetClass(elem), parent, elem))
File "C:\python24\lib\site-packages\PyQt4\uic\uiparser.py", line 108, in setup
Object
self.wprops.setProperties(obj, branch)
File "C:\python24\lib\site-packages\PyQt4\uic\properties.py", line 103, in set
Properties
getattr(widget, "set%s%s" % (propname[0].upper(), propname[1:]))(
File "C:\python24\lib\site-packages\PyQt4\uic\properties.py", line 77, in conv
ert
return func(prop[0])
File "C:\python24\lib\site-packages\PyQt4\uic\properties.py", line 48, in _str
ing
None, QtGui.QApplication.UnicodeUTF8)
TypeError: argument 2 of QCoreApplication.translate() has an invalid type
More information about the PyQt
mailing list