PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 409 - function -- PySide.QtUiTools.QUiLoader.load(...) -- takes bytes-string (but not unicode-string)
: function -- PySide.QtUiTools.QUiLoader.load(...) -- takes bytes-string (but n...
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtUiTools
: 0.4.1
: All All
: P3 enhancement
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-10-13 01:27 EEST by Andrej A Antonov
Modified: 2010-11-25 17:48 EET (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej A Antonov 2010-10-13 01:27:06 EEST
Overview:

function -- PySide.QtUiTools.QUiLoader.load(...) -- takes bytes-string (but not
unicode-string)



Steps to Reproduce: 


$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PySide import QtGui, QtUiTools
>>> QtGui.QApplication([])
<PySide.QtGui.QApplication object at 0xa1a1cc0>
>>> 
>>> 
>>> 
>>> ldr = QtUiTools.QUiLoader()
>>> ldr.load(u'path/to/file')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'PySide.QtUiTools.QUiLoader.load' called with wrong argument types:
  PySide.QtUiTools.QUiLoader.load(unicode)
Supported signatures:
  PySide.QtUiTools.QUiLoader.load(PySide.QtCore.QIODevice, PySide.QtGui.QWidget
= None)
  PySide.QtUiTools.QUiLoader.load(str, PySide.QtGui.QWidget = None)
>>>
Comment 1 Andrej A Antonov 2010-10-13 01:31:42 EEST
but this way is work:



$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PySide import QtGui, QtCore, QtUiTools
>>> QtGui.QApplication([])
<PySide.QtGui.QApplication object at 0x9caecc0>
>>> 
>>> 
>>> 
>>> ldr = QtUiTools.QUiLoader()
>>> ldr.load(QtCore.QFile(u'path/to/file'))
<PySide.QtGui.QWidget object at 0x9caeea0>
>>>
Comment 2 Hugo Parente Lima 2010-10-28 17:35:08 EEST
Fixed in commit:
pyside/a1524b78b632d99aa6076391d0d77e46271dd7c8
Comment 3 renato filho 2010-11-25 17:48:12 EET
released on 1.0.0~beta1