[Kubuntu 17.10 / PPA daily] QtQr crashes while saving to PNG

Bug #1729066 reported by ed20900
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
qr-tools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

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'
Abortado (`core' generado)

While saving a QR code with the following WiFi Network information:

SSID: EXAMPLE_SSID
PASSWORD: 714f15160af9de64ce5f2835b191c1e226418f01baa84011c1b1075201bdf2
Encryption: WPA/WPA2
Pixel size: 5
Protection level: Minimum/Lowest
Margin size: 6

I have tested with the version of QtQr in Kubuntu repositories and with the latest version from the daily PPA. The same crash is reported.
Additionally, QtQr writes a file every time I introduce a character of any of the fields of the WiFi network (SSID, PASSWORD, encryption). The directory where I launch QtQr from has the following files:

714f15160af9de64ce5f2835b191c1e226418f01baa84011c1b1075201bdf2.png EXAMPLE.png EXAMPLE_SSI.png EXAM.png EX.png
E.png EXAMPLE_S.png EXAMPLE_SS.png EXAMP.png
EXAMPLE_.png EXAMPLE_SSID.png EXAMPL.png EXA.png

I copied and pasted the password string, so maybe that is why it has generated extra files.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: qtqr 1.4~bzr23-1
ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
Uname: Linux 4.13.0-16-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.1
Architecture: amd64
CurrentDesktop: KDE
Date: Tue Oct 31 20:21:03 2017
InstallationDate: Installed on 2015-07-31 (823 days ago)
InstallationMedia: Ubuntu 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
PackageArchitecture: all
SourcePackage: qr-tools
UpgradeStatus: Upgraded to artful on 2017-10-25 (6 days ago)

Revision history for this message
ed20900 (ed20900) wrote :
Revision history for this message
Alexander Traud (traud) wrote :

Facing the same traceback while hitting the button 'Save QRCode' in Ubuntu 17.10 and Ubuntu 18.04 LTS. Attached is a patch, which fixed the issue for me. Because Python is a scripting language, you can apply that patch directly without any recompiling:
sudo patch -p0 <./filename_tuple.patch

The issue was introduced with the change of the Python binding from Qt4 to Qt5. In the head of development (branch: trunk), this issue is fixed already with revision 27 (for Save via saveCode) and 24 (for Open via decodeFile). Although I solved this issue independently thanks to <https://stackoverflow.com/a/37822182>, I aligned the attached patch with the current trunk.

When it comes to your Wi-Fi typing issue, I am able to reproduce that even with the latest tool QtQR (revision 28) and latest library qr-tools (revision 29). Therefore, I opened a new bug report at <https://bugs.launchpad.net/qr-tools/+bug/1761713>.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "filename_tuple.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
MICHAEL MALLER (mikemaller) wrote :

I have the same problem with QtQR. When I try to save crash. Using Ubuntu 18.04 LTS. I am new to Linux. Alexander Traud can you please supply the fix with the full sudo patch. This is what I get when I run your fix

"" mike@Mike-Gateway-2:~$ sudo patch -p0 <./filename_tuple.patch
bash: ./filename_tuple.patch: No such file or directory ""

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qr-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Alexander Traud (traud) wrote :

Michael, the patch file is at the top of my message. You have to save that patch file to your computer (for example via a right-click: Save Link As…). Then on your Terminal, you change the directory/folder to that location (via the command cd, for example). Then, you can go for that patch command.

Alternatively, you download that file to your folder "Downloads" and directly use:
sudo patch -p0 <~/Downloads/filename_tuple.patch

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

Hello, the version in the Ubuntu repos is quite old. Please try using one of the project's officials PPA, either the Daily or the Stabel One.

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

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

Regards,
Ramiro.

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.