[PyKDE] pyuic4 problem

Detlev Offenbach detlev at die-offenbachs.de
Tue Sep 19 19:26:39 BST 2006


Hi,

the attached form doesn't compile with pyuic4 of the latest snapshot. The 
debug output is

---------------------
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'EmailDialog.ui'
#
# Created: Tue Sep 19 20:21:00 2006
#      by: PyQt4 UI code generator 4-snapshot-20060917
#
# WARNING! All changes made in this file will be lost!

import sys
DEBUG:root:UI version is 4.0
DEBUG:root:uiname is EmailDialog
from PyQt4 import QtCore, QtGui

class Ui_EmailDialog(object):
    def setupUi(self, EmailDialog):
        EmailDialog.setObjectName("EmailDialog")
DEBUG:root:toplevel widget is QDialog
        
EmailDialog.resize(QtCore.QSize(QtCore.QRect(0,0,600,547).size()).expandedTo(EmailDialog.minimumSizeHint()))
        EmailDialog.setSizeGripEnabled(True)
DEBUG:root:push QDialog EmailDialog

        self.vboxlayout = QtGui.QVBoxLayout(EmailDialog)
        self.vboxlayout.setMargin(6)
        self.vboxlayout.setSpacing(6)
        self.vboxlayout.setObjectName("vboxlayout")
DEBUG:root:push QVBoxLayout vboxlayout

        self.mainSplitter = QtGui.QSplitter(EmailDialog)
DEBUG:root:Vertical
        self.mainSplitter.setOrientation(QtCore.Qt.Vertical)
        self.mainSplitter.setObjectName("mainSplitter")
DEBUG:root:push QSplitter mainSplitter

        self.layout5 = QtGui.QWidget(self.mainSplitter)
        self.layout5.setObjectName("layout5")
DEBUG:root:push QWidget layout5

        self.vboxlayout1 = QtGui.QVBoxLayout(self.layout5)
        self.vboxlayout1.setMargin(0)
        self.vboxlayout1.setSpacing(6)
        self.vboxlayout1.setObjectName("vboxlayout1")
DEBUG:root:push QVBoxLayout vboxlayout1

        self.hboxlayout = QtGui.QHBoxLayout()
        self.hboxlayout.setMargin(0)
        self.hboxlayout.setSpacing(6)
        self.hboxlayout.setObjectName("hboxlayout")
DEBUG:root:push QHBoxLayout hboxlayout

        self.textLabel1 = QtGui.QLabel(self.layout5)
        self.textLabel1.setObjectName("textLabel1")
DEBUG:root:push QLabel textLabel1
DEBUG:root:pop widget QLabel textLabel1
DEBUG:root:new topwidget self.layout5
        self.hboxlayout.addWidget(self.textLabel1)

        self.subject = QtGui.QLineEdit(self.layout5)
        self.subject.setObjectName("subject")
DEBUG:root:push QLineEdit subject
DEBUG:root:pop widget QLineEdit subject
DEBUG:root:new topwidget self.layout5
        self.hboxlayout.addWidget(self.subject)
DEBUG:root:pop layout QHBoxLayout hboxlayout
        self.vboxlayout1.addLayout(self.hboxlayout)

        self.textLabel2 = QtGui.QLabel(self.layout5)
        self.textLabel2.setObjectName("textLabel2")
DEBUG:root:push QLabel textLabel2
DEBUG:root:pop widget QLabel textLabel2
DEBUG:root:new topwidget self.layout5
        self.vboxlayout1.addWidget(self.textLabel2)

        self.message = QtGui.QTextEdit(self.layout5)
DEBUG:root:FixedColumnWidth
        self.message.setLineWrapMode(QtGui.QTextEdit.FixedColumnWidth)
        self.message.setLineWrapColumnOrWidth(70)
        self.message.setTabStopWidth(8)
        self.message.setAcceptRichText(False)
        self.message.setObjectName("message")
DEBUG:root:push QTextEdit message
DEBUG:root:pop widget QTextEdit message
DEBUG:root:new topwidget self.layout5
        self.vboxlayout1.addWidget(self.message)
DEBUG:root:pop layout QVBoxLayout vboxlayout1
DEBUG:root:pop widget QWidget layout5
DEBUG:root:new topwidget self.mainSplitter

        self.layout9 = QtGui.QWidget(self.mainSplitter)
        self.layout9.setObjectName("layout9")
DEBUG:root:push QWidget layout9

        self.gridlayout = QtGui.QGridLayout(self.layout9)
        self.gridlayout.setMargin(0)
        self.gridlayout.setSpacing(6)
        self.gridlayout.setObjectName("gridlayout")
DEBUG:root:push QGridLayout gridlayout

        self.vboxlayout2 = QtGui.QVBoxLayout()
        self.vboxlayout2.setMargin(0)
        self.vboxlayout2.setSpacing(6)
        self.vboxlayout2.setObjectName("vboxlayout2")
DEBUG:root:push QVBoxLayout vboxlayout2

        self.addButton = QtGui.QPushButton(self.layout9)
        self.addButton.setObjectName("addButton")
DEBUG:root:push QPushButton addButton
DEBUG:root:pop widget QPushButton addButton
DEBUG:root:new topwidget self.layout9
        self.vboxlayout2.addWidget(self.addButton)

        self.deleteButton = QtGui.QPushButton(self.layout9)
        self.deleteButton.setObjectName("deleteButton")
DEBUG:root:push QPushButton deleteButton
DEBUG:root:pop widget QPushButton deleteButton
DEBUG:root:new topwidget self.layout9
        self.vboxlayout2.addWidget(self.deleteButton)

        spacerItem = 
QtGui.QSpacerItem(20,16,QtGui.QSizePolicy.Minimum,QtGui.QSizePolicy.Expanding)
        self.vboxlayout2.addItem(spacerItem)
DEBUG:root:pop layout QVBoxLayout vboxlayout2
        self.gridlayout.addLayout(self.vboxlayout2,1,1,1,1)

        self.textLabel3 = QtGui.QLabel(self.layout9)

        sizePolicy = 
QtGui.QSizePolicy(QtGui.QSizePolicy.Policy(5),QtGui.QSizePolicy.Policy(0))
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        
sizePolicy.setHeightForWidth(self.textLabel3.sizePolicy().hasHeightForWidth())
        self.textLabel3.setSizePolicy(sizePolicy)
        self.textLabel3.setObjectName("textLabel3")
DEBUG:root:push QLabel textLabel3
DEBUG:root:pop widget QLabel textLabel3
DEBUG:root:new topwidget self.layout9
        self.gridlayout.addWidget(self.textLabel3,0,0,1,2)

        self.attachments = QtGui.QTreeWidget(self.layout9)
        self.attachments.setAlternatingRowColors(True)
        self.attachments.setRootIsDecorated(False)
        self.attachments.setObjectName("attachments")
DEBUG:root:push QTreeWidget attachments
Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/pyuic.py", line 65, in ?
    error = generateUi(args[1], options.output, options.execute, 
options.indent)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/pyuic.py", line 28, in 
generateUi
    uic.compileUi(uifname, pyfile, execute, indent)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/__init__.py", line 54, in 
compileUi
    winfo = compiler.UICompiler().compileUi(uifile, pyfile)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/Compiler/compiler.py", 
line 64, in compileUi
    w = self.parse(input_stream)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 481, 
in parse
    actor(elem)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 345, 
in createUserInterface
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 322, 
in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 213, 
in createLayout
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 322, 
in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 222, 
in handleItem
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 322, 
in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 158, 
in createWidget
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 322, 
in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 158, 
in createWidget
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 322, 
in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 213, 
in createLayout
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 322, 
in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 222, 
in handleItem
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 322, 
in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 158, 
in createWidget
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 322, 
in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/uiparser.py", line 274, 
in addHeader
    self.wprops.getProperty(elem, "text"))
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/properties.py", line 145, 
in getProperty
    return self._getChild("property", elem, name, default)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/properties.py", line 140, 
in _getChild
    return self.convert(prop)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/properties.py", line 131, 
in convert
    return func(prop[0], **args)
  File "/usr/lib64/python2.4/site-packages/PyQt4/uic/properties.py", line 61, 
in _string
    text = prop.text.encode("UTF-8")
AttributeError: 'NoneType' object has no attribute 'encode'
---------------------

Regards,
Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EmailDialog.ui
Type: application/x-designer
Size: 8457 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20060919/b597125d/EmailDialog.bin


More information about the PyQt mailing list