PIL exception fromstring
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Qreator |
Confirmed
|
Medium
|
Unassigned | ||
python-qrencode (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
New
|
Undecided
|
Unassigned | ||
Yakkety |
Fix Released
|
Undecided
|
Chow Loong Jin | ||
qreator (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
New
|
Undecided
|
Unassigned | ||
Yakkety |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[Impact]
python-qrencode is currently broken for all users in yakkety due to the removal of Image.fromstring from pillow.
The fix is to replace all calls to Image.fromstring with Image.frombytes.
[Test Case]
Run the following script and see if it ends in an exception:
```
import qrencode
qrencode.
```
[Regression Potential]
It's unlikely that python-qrencode can regress any further, because in its current state, both exported python methods are completely broken and will throw an exception unconditionally with the pillow version in Yakkety.
[Other Info]
rdeps may also be broken if they use Image.tostring on the output. So far, the only known rdep that is broken is qreator.
Below is the stack trace and exception thrown by the broken version of qrencode.
In [5]: qrencode.
-------
Exception Traceback (most recent call last)
<ipython-
----> 1 qrencode.
/usr/lib/
67 the QR-code.
68 """
---> 69 version, src_size, im = encode(data, version, level, hint, case_sensitive)
70 if size < src_size:
71 size = src_size
/usr/lib/
45 version, size, data = _encode(data, version, level, hint, False)
46
---> 47 im = Image.fromstrin
48 return (version, size, im)
49
/usr/lib/
2061 def fromstring(*args, **kw):
2062 raise Exception(
-> 2063 "Please call frombytes() instead.")
2064
2065
Exception: fromstring() has been removed. Please call frombytes() instead.
In [6]:
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: python-qrencode 1.01-5
Uname: Linux 4.6.0-040600-
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: GNOME
Date: Tue May 31 07:40:21 2016
InstallationDate: Installed on 2015-12-02 (180 days ago)
InstallationMedia: Ubuntu-GNOME 16.04 LTS "Xenial Xerus" - Alpha amd64 (20151027)
SourcePackage: python-qrencode
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in python-qrencode (Ubuntu): | |
importance: | Undecided → Medium |
description: | updated |
Changed in qreator: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in qreator (Ubuntu Yakkety): | |
status: | New → Confirmed |
tags: | added: patch |
Changed in qreator (Ubuntu Yakkety): | |
status: | Confirmed → Won't Fix |
Status changed to 'Confirmed' because the bug affects multiple users.