[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] TypeError in QImage.loadFromData() in PyQt5.5.1
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2015-11-05 17:16:58
Message-ID: D2CAADE0-5800-484E-9FE3-49596A61AF22 () riverbankcomputing ! com
[Download RAW message or body]

On 5 Nov 2015, at 4:50 p.m., Milorad Pop-Tosic <pop@hiri.com> wrote:
> 
> Hi all,
> 
> Our tests detected a possible regression in QImage.loadFromData() after we switched \
> from PyQt 5.4.1 to 5.5.1. This snippet demonstrates the problem:
> 
> from PyQt5.QtGui import QImage
> image = QImage()
> image.loadFromData('abc')
> 
> On PyQt5.5.1 this fails with:
> 
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> TypeError: arguments did not match any overloaded call:
> QImage.loadFromData(str, str format=None): argument 1 has unexpected type 'str'
> QImage.loadFromData(QByteArray, str format=None): argument 1 has unexpected type \
> 'str' 
> On PyQt5.4.1 it works fine.
> 
> Environment:
> Python 3.4.2 on Windows in both cases.

http://pyqt.sourceforge.net/Docs/PyQt5/incompatibilities.html#pyqt-v5-5

However there is a SIP bug which means that the above exception message is misleading \
- it should say 'bytes' rather than 'str'.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic