FS#53045 - QPixmap in python2-pyqt5 appears broken.
Attached to Project:
Arch Linux
Opened by Eric Soroos (wiredfool) - Wednesday, 22 February 2017, 10:37 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 22 February 2017, 15:24 GMT
Opened by Eric Soroos (wiredfool) - Wednesday, 22 February 2017, 10:37 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 22 February 2017, 15:24 GMT
|
Details
Description:
On Arch, calling QPixmap.fromImage(QImage) fails, (as well as other similar methods, like convertFromImage). This succeeds on Ubuntu Xenial 16.04, so I'm suspecting that it's a packaging issue somewhere. Additional info: * pacman -Q python2-pyqt5 python2-pyqt5 5.8-1 * Pillow: https://github.com/python-pillow/Pillow/commit/9b82bdbb1026346b6788ebaa54b678b112f81ecb Steps to reproduce: With this dockerfile/repo: https://github.com/python-pillow/docker-images/blob/master/arch/Dockerfile Install pillow @ this commit > https://github.com/python-pillow/Pillow/commit/9b82bdbb1026346b6788ebaa54b678b112f81ecb (subsequent commits skip the failing test on Arch) from Pillow directory: python2 test-installed.py Tests/test_image_toqpixmap.py |
This task depends upon
Closed by Antonio Rojas (arojas)
Wednesday, 22 February 2017, 15:24 GMT
Reason for closing: Upstream
Wednesday, 22 February 2017, 15:24 GMT
Reason for closing: Upstream
> git clone https://github.com/python-pillow/Pillow
...
> cd Pillow
> git checkout 9b82bdbb1026346b6788ebaa54b678b112f81ecb
Note: checking out '9b82bdbb1026346b6788ebaa54b678b112f81ecb'.
HEAD is now at 9b82bdbb... fix ToQimage tests for QT5
> python Tests/test_image_toqpixmap.py
QSettings::value: Empty key passed
QSettings::value: Empty key passed
/usr/lib/python3.6/site-packages/PIL/Image.py:844: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.ppm'>
self.load()
.
----------------------------------------------------------------------
Ran 1 test in 0.071s
OK
> python2 Tests/test_image_toqpixmap.py
QSettings::value: Empty key passed
QSettings::value: Empty key passed
.
----------------------------------------------------------------------
Ran 1 test in 0.454s
OK
Please post the actual errors
(vpy) [pillow@b5aa74789d15 Pillow]$ xvfb-run -a python2 Tests/test_image_toqpixmap.py
F=== orphaned temp file: /tmp/tempmkbp64_1.png
======================================================================
FAIL: TestToQPixmap.test_sanity
----------------------------------------------------------------------
Traceback (most recent call last):
File "Tests/test_image_toqpixmap.py", line 19, in test_sanity
self.assertFalse(data.isNull())
AssertionError: True is not false
----------------------------------------------------------------------
Ran 1 test in 0.032s
FAILED (failures=1)
#(and without xvfb, I don't have an X connection)
(vpy) [pillow@b5aa74789d15 Pillow]$ python2 Tests/test_image_toqpixmap.py
QXcbConnection: Could not connect to display
Aborted (core dumped)
(vpy) [pillow@b5aa74789d15 Pillow]$
# and in Python3:
(vpy3) [pillow@b5aa74789d15 Pillow]$ xvfb-run -a python Tests/test_image_toqpixmap.py
/vpy3/lib/python3.6/site-packages/Pillow-4.1.0.dev0-py3.6-linux-x86_64.egg/PIL/Image.py:844: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.ppm'>
F
======================================================================
FAIL: TestToQPixmap.test_sanity
----------------------------------------------------------------------
Traceback (most recent call last):
File "Tests/test_image_toqpixmap.py", line 19, in test_sanity
self.assertFalse(data.isNull())
AssertionError: True is not false
----------------------------------------------------------------------
Ran 1 test in 0.123s
FAILED (failures=1)
(vpy) [pillow@85a03a27d5eb Pillow]$ xvfb-run -a ./test-installed.py Tests/test_image_toqpixmap.py
F
======================================================================
FAIL: TestToQPixmap.test_sanity
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Pillow/Tests/test_image_toqpixmap.py", line 19, in test_sanity
self.assertFalse(data.isNull())
AssertionError: True is not false
----------------------------------------------------------------------
Ran 1 test in 0.195s
FAILED (failures=1)
(vpy) [pillow@85a03a27d5eb Pillow]$ QT_QPA_PLATFORM=offscreen xvfb-run -a ./test-installed.py Tests/test_image_toqpixmap.py
.
----------------------------------------------------------------------
Ran 1 test in 0.186s
OK