2

QTQR do not show bar codes anymore, no matter whether input is read from file or webcam in 16.04. It used to work just fine in 15.x, 14.x, ... It still Generates QR codes just fine, and in contacts the date is now only included if the checkbox is checked (great) ![enter image description here]1 Dropping Qr-codes on the right does not work either! When trying from cli I get this when opening (or not) a file:

ken@ken-Latitude-E6510:~/Pictures/Barcods$ qtqr Traceback (most recent call last): File "/usr/bin/qtqr", line 540, in decodeFile if qr.decode(): File "/usr/lib/python2.7/dist-packages/qrtools.py", line 181, in decode raw = pil.tostring() File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 695, in tostring "Please call tobytes() instead.") Exception: tostring() has been removed. Please call tobytes() instead.

So it must be an error!

Ken Mollerup
  • 1,315

2 Answers2

1

While we wait for a fix, we can do as the error output and Karl Ricsays says: open with sudo: /usr/lib/python2.7/dist-packages/qrtools.py

Locate line 181: raw = pil.tostring()

Change it to: raw = pil.tobytes()

Save the python script and start QtQR.

Now it works![enter image description here]1

Ken Mollerup
  • 1,315
0

The terminal output

/usr/lib/python2.7/dist-packages/PIL/Image.py:870: UserWarning: Palette images with Transparency   expressed in bytes should be converted to RGBA images
  'to RGBA images')
Traceback (most recent call last):
  File "/usr/bin/qtqr", line 540, in decodeFile
    if qr.decode():
  File "/usr/lib/python2.7/dist-packages/qrtools.py", line 181, in decode
    raw = pil.tostring()
  File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 695, in tostring
    "Please call tobytes() instead.")
Exception: tostring() has been removed. Please call tobytes() instead.
Traceback (most recent call last):
  File "/usr/bin/qtqr", line 540, in decodeFile
    if qr.decode():
  File "/usr/lib/python2.7/dist-packages/qrtools.py", line 181, in decode
    raw = pil.tostring()
  File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 695, in tostring
    "Please call tobytes() instead.")
Exception: tostring() has been removed. Please call tobytes() instead.

indicates a bug which I filed at https://bugs.launchpad.net/ubuntu/+source/qr-tools/+bug/1589965. You can only sit and wait until it's fixed (or fix it yourself and share, of course).