Decode from webcam with no device attached

Bug #1159982 reported by MaxiPunkt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QR Tools
Fix Released
Medium
Ramiro Algozino

Bug Description

Hi there,

I tried QtQR on two computers, on both Fedora-FC18 is running.

One computer does have a built-in webcam - no problems here.

The other computer does not have a webcam attached.
If I click on "Decode from webcam", QtQR does not really crash (it's still usable afterwards), but I get an allert of Fedora's "ARBT" every time.

"ARBT" is some kind of automatic bug-reporting tool, which seems to dislike clicking on this specific QtQR-function with no camera attached.

If I start QtQR from console, I can see some error-messages:
Traceback (most recent call last):
  File "/usr/bin/qtqr.py", line 637, in decodeWebcam
    vdDialog = VideoDevices()
  File "/usr/bin/qtqr.py", line 674, in __init__
    for vd in self.getVideoDevices():
  File "/usr/bin/qtqr.py", line 703, in getVideoDevices
    for dev in os.listdir("/dev/v4l/by-id"):
OSError: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/dev/v4l/by-id'

Of course no camera can be found on this system - but would it be possible to encance present code of QtQR-app in a way not resulting in an ARBT-alert, anymore?

Thanks!

Related branches

Changed in qr-tools:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Ramiro Algozino (algozino)
Revision history for this message
Ramiro Algozino (algozino) wrote :

Hello Maxi!

 I've added a condition in the webcam detection. Could you please update to the daily PPA in a few hours and test if this is solved?

Thanks in advance!

Revision history for this message
MaxiPunkt (maxantispam) wrote :

Sorry for my late reply.

This issue now behaves different in BZR-rev: 16, but still ist not completely gone.

Running from console on a computer with no webcam, I now get:

Traceback (most recent call last):
  File "/usr/bin/qtqr.py", line 689, in decodeWebcam
    device = vdDialog.videoDevices[vdDialog.videoDevice.currentIndex()][1]
IndexError: list index out of range

This happens when I click on "OK"-button and above pull-down list is greyed-out, as no WebCam could be found.
If I click on "Cancel"-button, everything is fine.

Changed in qr-tools:
milestone: none → 1.4
Revision history for this message
Ramiro Algozino (algozino) wrote :

Hello Maxi,

 I'm very sorry for the delay. This should be fixed now.

Thanks a lot.

Best regards!
Ramiro.

Changed in qr-tools:
status: In Progress → Fix Released
Revision history for this message
MaxiPunkt (maxantispam) wrote :

Hi there,

BZR-rev. 21 does work for me now.

Thanks a lot!

Max

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.