Import Issues with cv2

:rotating_light: Before clicking “Create Topic”, please make sure your post includes the following information (otherwise, the post will be locked). :rotating_light:

[link to the public deployed app.] (https://khetiwave.streamlit.app/)
[Github link] GitHub - nrvamshi/project


ImportError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).

Traceback:

File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)File "/mount/src/project/sample.py", line 1, in <module>
    import cv2

streamlit lastest and python 3.11

In requirements.txt change the package name as follows:-

#from
opencv-python-headless

#to
opencv-contrib-python-headless

Definitely it will works. Because two days before I have deployed my app with same package name.

Happy Streamlit-ing :balloon:

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