[Eric] Failure to try PySide

Algis Kabaila akabaila at pcug.org.au
Sat Oct 30 03:36:44 BST 2010


On Friday 29 October 2010 22:14:03 Detlev Offenbach wrote:
> On Montag, 25. Oktober 2010, Algis Kabaila wrote:
> > Hi Detlev,
> > 
> > I am a real fan of Eric - it is a great program and a teaching 
tool as
> > well.  For this reason i want to draw your attention to a 
situation
> > where Eric fails.  For the record, I use the binaries from ubuntu
> > 10.10 repositories, including Eric - 4.4.4a (r3717).  I attempted 
to
> > try our PySide,  which in essence is an early incarnation of a 
clone
> > of PyQt.  My OS is kubuntu 10.10.  I suspect that OS is the real
> > cause of my problems and I am considering of moving to a gnome 
version
> > of ubuntu for my programming exercises, which may well make Eric 
more
> > robust.
> > 
> > This is my very simple trial program to to test PySide against 
PyQt:
> > 
> > #!/usr/bin/env python
> > ''' trypyside.py - minimal try program'''
> > 
> > import sys
> > 
> > DEFAULT = 0
> > # default = 1 -> use PyQt, else use PySide
> > 
> > if DEFAULT:
> >     from PyQt4 import (QtGui, QtCore)
> > else:
> >     from PySide  import (QtGui, QtCore)
> > 
> > class MainWindow(QtGui.QMainWindow):
> >     def __init__(self, parent=None):
> >         super(MainWindow, self).__init__(parent)
> > 
> > if __name__ == '__main__':
> >     app = QtGui.QApplication(sys.argv)
> >     frame = MainWindow()
> >     frame.show()
> >     app.exec_()
> > 
> > In Eric  it fails on  line 19 (app = QtGui.QApplication(sys.argv) 
with
> > an error message "The debugger program raised the exception 
TypeError
> > "bad argument for a built in operation".
> > 
> > The same program from a command line works OK and here is the 
dialog:
> 
> Hello,
> 
> this is not an eric4 issue but rather a PySide bug. In the eric4 
debugger 
> backend all strings are handled as unicode. That means sys.argv is 
> [u'trypyside.py']. PySide doesn't seem to convert unicode strings to 
QString. 
> You should report a bug to the PySide people. To reproduce the issue 
just 
> execute these lines in a Python console.
> 
> >>> from PySide import QtGui
> >>> import sys
> >>> app = QtGui.QApplication([u"pyside.py"])
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: bad argument type for built-in operation
> 
> Regards,
> Detlev
> -- 
> Detlev Offenbach
> detlev at die-offenbachs.de
> 
Detlev,

Thank you for your continues effort.  I saw your email to pyside with 
the bug report, today I think (our time - Australia).  I think they  
did fix it.   As I use binaries, I will have to wait a while, or take a 
deep breath and face the compiling  :).

I wandered why all programs failed in the same manner, reporting 
incompatibility of argument in QApplication(argument)!

You have a great program, you do great work and show immense endurance 
-  congratulations and a well deserved THANK YOU.

OldAl.
-- 
Algis Kabaila
http://akabaila.pcug.org.au/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20101030/7cb2f7a7/attachment.html>


More information about the Eric mailing list