Cannot deploy the QR code scanner app , giving various errors

URL : GitHub - cchahar/QRdemoapp

Streamlit Error:

File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
    exec(code, module.__dict__)File "/mount/src/qrdemoapp/QRstreamlit.py", line 1, in <module>
    import cv2File "/home/adminuser/venv/lib/python3.9/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()File "/home/adminuser/venv/lib/python3.9/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)

I have been trying this for long, done all possible changes in the requirements and packages file Please help.

Hi @CSed . It seems that your requirements.txt doesn’t have any dependencies. Recheck the file once.


Add the following dependency to requirements.txt file as follows:-

streamlit-qrcode-scanner
streamlit

Happy Streamlit-ing :balloon:

1 Like

Hi all, The above code was solved but I was trying this code GitHub - cchahar/QRscanapp to deploy on the streamlit cloud. Can you please help where the error is. Getting these error messages as below, TIA. (I am using windows/Chrome)
[ WARN:0@0.105] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video0): can’t open camera by index


[ERROR:0@0.105] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.