pyuic4 Issues

Need help with C, C++, perl, python, etc?

pyuic4 Issues

Postby bracprogrammer » 2007-01-26 20:54

I'm developing a program using Qt Designer (4) and PyQt (4). pyuic4, however, keeps spitting out an error. Despite my best google efforts, I can't figure out a solution. I'll post the code below, and thanks for any advice you guys might have.

sql@mysql:~/Desktop/Project$ pyuic4 -d main.ui
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'main.ui'
#
# Created: Fri Jan 26 12:44:56 2007
# by: PyQt4 UI code generator 4.0.1
#
# WARNING! All changes made in this file will be lost!

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

class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
DEBUG:root:toplevel widget is QMainWindow
MainWindow.resize(QtCore.QSize(QtCore.QRect(0,0,1280,950).size()).expandedTo(MainWindow.minimumSizeHint()))

palette = QtGui.QPalette()
Traceback (most recent call last):
File "/usr/bin/pyuic4", line 65, in ?
error = generateUi(args[1], options.output, options.execute, options.indent)
File "/usr/bin/pyuic4", line 28, in generateUi
uic.compileUi(uifname, pyfile, execute, indent)
File "/usr/lib/python2.4/site-packages/PyQt4/uic/__init__.py", line 54, in compileUi
winfo = compiler.UICompiler().compileUi(uifile, pyfile)
File "/usr/lib/python2.4/site-packages/PyQt4/uic/Compiler/compiler.py", line 65, in compileUi
w = self.parse(input_stream)
File "/usr/lib/python2.4/site-packages/PyQt4/uic/uiparser.py", line 452, in parse
actor(elem)
File "/usr/lib/python2.4/site-packages/PyQt4/uic/uiparser.py", line 319, in createUserInterface
self.wprops.setProperties(self.toplevelWidget, elem)
File "/usr/lib/python2.4/site-packages/PyQt4/uic/properties.py", line 159, in setProperties
getattr(self, propname)(widget, prop)
File "/usr/lib/python2.4/site-packages/PyQt4/uic/properties.py", line 226, in palette
self._color(color))
File "/usr/lib/python2.4/site-packages/PyQt4/uic/properties.py", line 69, in _color
return QtGui.QColor(*int_list(prop))
File "/usr/lib/python2.4/site-packages/PyQt4/uic/properties.py", line 10, in int_list
return [int(child.text) for child in iter(prop)]
ValueError: invalid literal for int():
bracprogrammer
 
Posts: 1
Joined: 2007-01-26 20:47

Postby thamarok » 2007-01-26 22:04

It could be something wrong with your source code.. if you could post it, I think some QT gurus could help you.
thamarok
 

Postby ajdlinux » 2007-01-26 22:37

Yes, please post your UI file, otherwise it's a bit hard to track down :)
Jabber: xmpp:ajdlinux@jabber.org.au
Spammers, email this: ajdspambucket@exemail.com.au
ajdlinux
 
Posts: 2480
Joined: 2006-04-23 09:37
Location: Port Macquarie, NSW, Australia

Postby Lavene » 2007-01-27 06:14

Just a tip: Phil Thompson, the creator of PyQt, is very active on the PyKDE mailing list and on the comp.lang.python newsgroup. Both are very friendly and helpful groups too (personally I prefer the usenet group).

Anyway, as 'ajdlinux' is saying it's hard to say what's wrong without your .ui file.

Tina
Lavene
Site admin
 
Posts: 5096
Joined: 2006-01-04 04:26
Location: Oslo, Norway


Return to Programming

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable