Crashes when saving QR-code

Bug #1846968 reported by Bernard Decock
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QR Tools
Fix Released
Undecided
Unassigned

Bug Description

QR-code for an URL doesn't pop-up until the pixel-size is being changed.

When saving the code in .png, the program crashes
Traceback (most recent call last):
  File "/usr/bin/qtqr", line 509, in saveCode
    if not fn.toLower().endsWith(u".png") \
AttributeError: 'tuple' object has no attribute 'toLower'

Revision history for this message
Ramiro Algozino (algozino) wrote : Re: [Bug 1846968] [NEW] Crashes when saving QR-code

Hello,

What Version of QtQR are you using and on what operating system? If you are not using the latest version could you please try with the Daily PPA one?

Thanks,

Ramiro Algozino
https://algozino.com.ar/
On 6 Oct 2019, 19:55 +0200, Bernard Decock <email address hidden>, wrote:
> Public bug reported:
>
> QR-code for an URL doesn't pop-up until the pixel-size is being changed.
>
> When saving the code in .png, the program crashes
> Traceback (most recent call last):
> File "/usr/bin/qtqr", line 509, in saveCode
> if not fn.toLower().endsWith(u".png") \
> AttributeError: 'tuple' object has no attribute 'toLower'
>
> ** Affects: qr-tools
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of QR Tools
> Team, which is subscribed to QR Tools.
> https://bugs.launchpad.net/bugs/1846968
>
> Title:
> Crashes when saving QR-code
>
> Status in QR Tools:
> New
>
> Bug description:
> QR-code for an URL doesn't pop-up until the pixel-size is being
> changed.
>
> When saving the code in .png, the program crashes
> Traceback (most recent call last):
> File "/usr/bin/qtqr", line 509, in saveCode
> if not fn.toLower().endsWith(u".png") \
> AttributeError: 'tuple' object has no attribute 'toLower'
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/qr-tools/+bug/1846968/+subscriptions

Revision history for this message
Bernard Decock (decockbernard) wrote :

Hi Ramiro,

I notice a different behaviour between LinuxMint 18.3 Cinnamon and LinuxMint 19.2.

LinuxMint 18.3
Version installed = 1.4~bzr21-1 (xenial)

Revision history for this message
Bernard Decock (decockbernard) wrote :

Hi Ramiro,

I notice a different behaviour between LinuxMint 18.3 Cinnamon and LinuxMint 19.2.

LinuxMint 18.3
Version installed = 1.4~bzr21-1 (xenial)

With the version the saving of the QR-code is ok. However one can't drag a QR-code for decoding:
/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 736, in dropEvent
    self.decodeFile(unicode(fn))
  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.

Decoding from a file doesn't work either
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.

Linux Mint 19.2 : version installed = 1.4~bzr23-1 (bionic)

Saving the QR-code causes a crash
Decoding from a file does not at all
Decoding from the webcam is ok

Entering an URL gives the effect underneath
qt5ct: using qt5ct plugin
Failed to create file: http://w.png
No such file or directory
Something went wrong while trying to generate the QR Code
Failed to create file: http://ww.png
No such file or directory
Something went wrong while trying to generate the QR Code
Failed to create file: http://www.png
No such file or directory
Something went wrong while trying to generate the QR Code

Revision history for this message
Ramiro Algozino (algozino) wrote : Re: [Bug 1846968] Re: Crashes when saving QR-code

Bello Bernard,

I assume you are using the version that’s available in the Mint repos, it happens to be outdated. Please could you try using the Stable or Daily PPAs instead?

Daily PPA:
https://launchpad.net/~qr-tools-developers/+archive/ubuntu/daily

Stable PPA:
https://launchpad.net/~qr-tools-developers/+archive/ubuntu/qr-tools-stable

Please let me know if you still have problems with the latest versions.

Ramiro Algozino
https://algozino.com.ar/
On 7 Oct 2019, 11:30 +0200, Bernard Decock <email address hidden>, wrote:
> Hi Ramiro,
>
> I notice a different behaviour between LinuxMint 18.3 Cinnamon and
> LinuxMint 19.2.
>
> LinuxMint 18.3
> Version installed = 1.4~bzr21-1 (xenial)
>
> With the version the saving of the QR-code is ok. However one can't drag a QR-code for decoding:
> /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 736, in dropEvent
> self.decodeFile(unicode(fn))
> 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.
>
> Decoding from a file doesn't work either
> 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.
>
> Linux Mint 19.2 : version installed = 1.4~bzr23-1 (bionic)
>
> Saving the QR-code causes a crash
> Decoding from a file does not at all
> Decoding from the webcam is ok
>
> Entering an URL gives the effect underneath
> qt5ct: using qt5ct plugin
> Failed to create file: http://w.png
> No such file or directory
> Something went wrong while trying to generate the QR Code
> Failed to create file: http://ww.png
> No such file or directory
> Something went wrong while trying to generate the QR Code
> Failed to create file: http://www.png
> No such file or directory
> Something went wrong while trying to generate the QR Code
>
> --
> You received this bug notification because you are a member of QR Tools
> Team, which is subscribed to QR Tools.
> https://bugs.launchpad.net/bugs/1846968
>
> Title:
> Crashes when saving QR-code
>
> Status in QR Tools:
> New
>
> Bug description:
> QR-code for an URL doesn't pop-up until the pixel-size is being
> changed.
>
> When saving the code in .png, the program crashes
> Traceback (most recent call last):
> File "/usr/bin/qtqr", line 509, in saveCode
> if not fn.toLower().endsWith(u".png") \
> AttributeError: 'tuple' object has no attribute 'toLower'
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/qr-tools/+bug/1846968/+subscriptions

Revision history for this message
Bernard Decock (decockbernard) wrote :

Hello Ramiro,

I tested with the stable ppa and everything works fine! Thank you for your advice.

I tested the saving of a QR-code, decoding from a file and decoding from a webcam.

Revision history for this message
Ramiro Algozino (algozino) wrote :

Thank you for the feedback, Bernard.

Have a nice day!
Regards,

Changed in qr-tools:
status: New → Invalid
Changed in qr-tools:
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.