qrtools don't decode a router wifi code

Bug #1810167 reported by carmine
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
QR Tools
Fix Released
Undecided
Unassigned

Bug Description

I have a wifi password from android mobile on qrcode.
I use qtqr version: 1.4~bzr21-1 in Debian 9.6
When i try to decode by webcam, I see this error:

$ qtqr
wifi:
Traceback (most recent call last):
  File "/usr/bin/qtqr", line 541, in decodeFile
    self.showInfo(qr)
  File "/usr/bin/qtqr", line 561, in showInfo
    data = qr.data_decode[dt](qr.data)
  File "/usr/lib/python2.7/dist-packages/qrtools.py", line 99, in <lambda>
    'wifi' : lambda data: re.findall(u"WIFI:S:(.*);T:(.*);P:(.*);;", data, re.IGNORECASE)[0],
IndexError: list index out of range

Why ?

Related branches

summary: - qtqr don't decode a router wifi code
+ qrtools don't decode a router wifi code
Revision history for this message
Ramiro Algozino (algozino) wrote :

Hello!

Sorry for the long delay. Could you please attach the QR code if possible so I can debug better the problem?

Also, please try using the latest version from the Daily PPA and check if the problem persists.

Thanks!

Changed in qr-tools:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for QR Tools because there has been no activity for 60 days.]

Changed in qr-tools:
status: Incomplete → Expired
Revision history for this message
Pokulo (pokulo) wrote :

This bug keeps qtqr failing when scanning WIFI qr codes generated by FritzBox. Attached a PNG of the failing QR Code. Its content is:

"WIFI:S:WifiName;T:WPA;P:605234075537023465159873240561365314585632096534;;"

$ qtqr --version
QtQR version 2.0

$ zbarcam --version
0.23.1

Revision history for this message
Pokulo (pokulo) wrote :

Actually the current code differs from original post, so my stack trace looks different as well:

Traceback (most recent call last):
  File "/usr/bin/qtqr", line 837, in decodeWebcam
    if qr.data_decode[qr.data_type](qr.data) == 'NULL':
  File "/usr/lib/python3.9/site-packages/qrtools.py", line 110, in <lambda>
    'wifi' : lambda data: re.findall(u"WIFI:S:(.*);T:(.*);P:(.*);[H:]+(.*);", data, re.IGNORECASE)[0],
IndexError: list index out of range

Looks to, as if "[H:]+(.*)" may be empty (missing "H:"), but regEx does not match in that case.

Revision history for this message
Pokulo (pokulo) wrote :

Changing "[H:]+(.*)" to "[H:]*(.*)" helped in my case, Will create a pull request on GitHub :)

Revision history for this message
Ramiro Algozino (algozino) wrote : Re: [Bug 1810167] Re: qrtools don't decode a router wifi code

Hi!

Yes, the regex fix looks ok. The H (used for hidden networks) field is
optional.

Please be aware that the official repo is here on launchpad. If you found
something on GitHub is not official.

Thanks!

On Wed, Dec 23, 2020, 13:30 Pokulo <email address hidden> wrote:

> Changing "[H:]+(.*)" to "[H:]*(.*)" helped in my case, Will create a
> pull request on GitHub :)
>
> --
> 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/1810167
>
> Title:
> qrtools don't decode a router wifi code
>
> Status in QR Tools:
> Expired
>
> Bug description:
> I have a wifi password from android mobile on qrcode.
> I use qtqr version: 1.4~bzr21-1 in Debian 9.6
> When i try to decode by webcam, I see this error:
>
> $ qtqr
> wifi:
> Traceback (most recent call last):
> File "/usr/bin/qtqr", line 541, in decodeFile
> self.showInfo(qr)
> File "/usr/bin/qtqr", line 561, in showInfo
> data = qr.data_decode[dt](qr.data)
> File "/usr/lib/python2.7/dist-packages/qrtools.py", line 99, in
> <lambda>
> 'wifi' : lambda data: re.findall(u"WIFI:S:(.*);T:(.*);P:(.*);;",
> data, re.IGNORECASE)[0],
> IndexError: list index out of range
>
> Why ?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/qr-tools/+bug/1810167/+subscriptions
>

Revision history for this message
Pokulo (pokulo) wrote :

Indeed. I first found an old fork on github, which confused me. I am currently trying to crate an push a new branch with bazaar, but I am completely new to this. Its a one-character fix. Do you need a branch (not even shure if you have Pull requests in bazaar)?

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

Thank you Pokulo. I've merged your branch into trunk. The fix should be available in the Daily PPA soon.

Have a merry Christmas and a happy new year.

Changed in qr-tools:
status: Expired → Fix Released
Revision history for this message
Pokulo (pokulo) wrote :

Thanks, same to you! Which Version will contain that bugfix? (I have arch linux actually, so I have to wait for our maintaner here https://archlinux.org/packages/community/any/qtqr/).

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

Sorry for the delayed answer. The version should be qtqr-2.1-0~rev43.

The deb packages are here if it helps somehow:
https://code.launchpad.net/~qr-tools-developers/+archive/ubuntu/daily/+packages

Sadly I don’t control the packages for different OS.

Best regards,

Ramiro
On 24 Dec 2020, 10:50 +0100, Pokulo <email address hidden>, wrote:
> Thanks, same to you! Which Version will contain that bugfix? (I have
> arch linux actually, so I have to wait for our maintaner here
> https://archlinux.org/packages/community/any/qtqr/).
>
> --
> 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/1810167
>
> Title:
> qrtools don't decode a router wifi code
>
> Status in QR Tools:
> Fix Released
>
> Bug description:
> I have a wifi password from android mobile on qrcode.
> I use qtqr version: 1.4~bzr21-1 in Debian 9.6
> When i try to decode by webcam, I see this error:
>
> $ qtqr
> wifi:
> Traceback (most recent call last):
> File "/usr/bin/qtqr", line 541, in decodeFile
> self.showInfo(qr)
> File "/usr/bin/qtqr", line 561, in showInfo
> data = qr.data_decode[dt](qr.data)
> File "/usr/lib/python2.7/dist-packages/qrtools.py", line 99, in <lambda>
> 'wifi' : lambda data: re.findall(u"WIFI:S:(.*);T:(.*);P:(.*);;", data, re.IGNORECASE)[0],
> IndexError: list index out of range
>
> Why ?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/qr-tools/+bug/1810167/+subscriptions

Revision history for this message
Pokulo (pokulo) wrote :

Thanks! I flagged the arch linux packages as out-of-date with reference to this bug-thread.

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

Thank you!

Ramiro Algozino
https://algozino.com.ar/
On 2 Jan 2021, 23:55 +0100, Pokulo <email address hidden>, wrote:
> Thanks! I flagged the arch linux packages as out-of-date with reference
> to this bug-thread.
>
> --
> 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/1810167
>
> Title:
> qrtools don't decode a router wifi code
>
> Status in QR Tools:
> Fix Released
>
> Bug description:
> I have a wifi password from android mobile on qrcode.
> I use qtqr version: 1.4~bzr21-1 in Debian 9.6
> When i try to decode by webcam, I see this error:
>
> $ qtqr
> wifi:
> Traceback (most recent call last):
> File "/usr/bin/qtqr", line 541, in decodeFile
> self.showInfo(qr)
> File "/usr/bin/qtqr", line 561, in showInfo
> data = qr.data_decode[dt](qr.data)
> File "/usr/lib/python2.7/dist-packages/qrtools.py", line 99, in <lambda>
> 'wifi' : lambda data: re.findall(u"WIFI:S:(.*);T:(.*);P:(.*);;", data, re.IGNORECASE)[0],
> IndexError: list index out of range
>
> Why ?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/qr-tools/+bug/1810167/+subscriptions

Revision history for this message
Pokulo (pokulo) wrote :

Arch Linux Package was updated to 2.1-1~bzrev43 today :)

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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