I believe you are using the wrong version of open() on line 28 - adding deviceID + appId together. It's better to use the new version of .open() taking two integers as parameter.
Added a sample file for qrcode detection in python
* sample python file for qrcode detection added in samples/python
* input taken using argparse and the indents were removed
* Removed unused variables
* updated the format and removed unused variables
Removed the use of global variables and used parameterised contructor instead
=set multi detection true by default
* added detection from camera
* samples(python): coding style in qrcode.py
Added DaSiamRPN tracker
* added DaSiamRPN tracker
* whitespace trouble handled
* Fixes for PR
* Fixes for PR
* Fixes for PR
* added new line in the end of the file and x_crop fix
* removed cxy_wh_2_rect function
* removed loop from sofrmax function
* more detailed discription about absolute paths to onnx models
* removed nested while loop, initialization moved from main tracking loop
* added assert message for small init bb
* initial bounding box on videostream
* selection of initial bounding box improved
* created tracker class, fixed initializing bounding box
* fix round of value
* names fix
* private methods renamed
* names fixed, case for video WIP
* fix case with video
* removed hardcoded size of window
* whitespace fix
* links to models fixed
* bounding box drawing fix
* changes does not required
* code style fixes
* fixes
* frame checker added in tracking loop
* fixed import sys
* Add python version of panorama_stitching_rotating_camera and perspective_correction
* Updated code
* added in the docs
* added python code in the docs
* docs change
* Add java tutorial as well
* Add toggle in documentation
* Added the link for Java code
* format code
* Refactored code
QR-Code detector : multiple detection
* change in qr-codes detection
* change in qr-codes detection
* change in test
* change in test
* add multiple detection
* multiple detection
* multiple detect
* add parallel implementation
* add functional for performance tests
* change in test
* add perftest
* returned implementation for 1 qr-code, added support for vector<Mat> and vector<vector<Point2f>> in MultipleDetectAndDecode
* deleted all lambda expressions
* changing in triangle sort
* fixed warnings
* fixed errors
* add java and python tests
* change in java tests
* change in java and python tests
* change in perf test
* change in qrcode.cpp
* add spaces
* change in qrcode.cpp
* change in qrcode.cpp
* change in qrcode.cpp
* change in java tests
* change in java tests
* solved problems
* solved problems
* change in java and python tests
* change in python tests
* change in python tests
* change in python tests
* change in methods name
* deleted sample qrcode_multi, change in qrcode.cpp
* change in perf tests
* change in objdetect.hpp
* deleted code duplication in sample qrcode.cpp
* returned spaces
* added spaces
* deleted draw function
* change in qrcode.cpp
* change in qrcode.cpp
* deleted all draw functions
* objdetect(QR): extractVerticalLines
* objdetect(QR): whitespaces
* objdetect(QR): simplify operations, avoid duplicated code
* change in interface, additional checks in java and python tests, added new key in sample for saving original image from camera
* fix warnings and errors in python test
* fix
* write in file with space key
* solved error with empty mat check in python test
* correct path to test image
* deleted spaces
* solved error with check empty mat in python tests
* added check of empty vector of points
* samples: rework qrcode.cpp
* objdetect(QR): fix API, input parameters must be first
* objdetect(QR): test/fix points layout
* Added java code for meanshift and optical_flow
* added java code for module video
* added appropriate spaces in codes
* converted absolute path to command line arguments
* added spaces at appropriate places
Python code examples for file IO in xml and yml format
* Initial "Pythonization" of file_input_output.cpp
* Moved file_input_output.py to correct location
* Nearly done Pythonizing file_input_output.cpp
* Python equivalent of file_input_output.py created
* Started Pythonizing camera_calibration.cpp
* Completed Python tutorial/sample code for file_input_output
* Resolved whitespace issues
* Removed tabs in file_input_output.cpp
* Patched import order and wrapped code in main function
* Changed string to docstring format in help file
* Updated link to Python example code
G-API: Tutorial: Face beautification algorithm implementation
* Introduce a tutorial on face beautification algorithm
- small typo issue in render_ocv.cpp
* Addressing comments rgarnov smirnov-alexey