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

Bug #1729066 reported by ed20900 on 2017-10-31
This bug affects 3 people
Affects Status Importance Assigned to Milestone
qr-tools (Ubuntu)

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:

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

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)

ed20900 (ed20900) wrote :
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>.

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
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 ""

Launchpad Janitor (janitor) wrote :

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

Changed in qr-tools (Ubuntu):
status: New → Confirmed
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

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.




To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers