Paddleocr conflict, please kindly help

AttributeError: 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).


File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/", line 565, in _run_script
    exec(code, module.__dict__)File "/app/npd/", line 33, in <module>
    from paddleocr import PaddleOCR, draw_ocr# Paddleocr目前支持中英文、英文、法语、德语、韩语、日语,可以通过修改lang参数进行切换   # 参数依次为`ch`, `en`, `french`, `german`, `korean`, `japan`。File "/home/appuser/venv/lib/python3.9/site-packages/paddleocr/", line 14, in <module>
    from .paddleocr import *File "/home/appuser/venv/lib/python3.9/site-packages/paddleocr/", line 25, in <module>
    import cv2File "/home/appuser/venv/lib/python3.9/site-packages/cv2/", line 181, in <module>
    bootstrap()File "/home/appuser/venv/lib/python3.9/site-packages/cv2/", line 175, in bootstrap
    if __load_extra_py_code_for_module("cv2", submodule, DEBUG):File "/home/appuser/venv/lib/python3.9/site-packages/cv2/", line 28, in __load_extra_py_code_for_module
    py_module = importlib.import_module(module_name)File "/usr/local/lib/python3.9/importlib/", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)File "/home/appuser/venv/lib/python3.9/site-packages/cv2/gapi/", line 290, in <module>
    cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline

I have no familiarity with that package, so I don’t have any specifics for you. However, you will want to make sure your environment is configured correctly.

  1. Make sure that you aren’t using multiple different files to manage Python packages. (I recommend using requirements.txt to manage Python packages with pip.)
  2. Make sure anything that needs to be installed that isn’t a Python package is listed in packages.txt

You can always trim your main file to just a few lines to check what’s installed and see how the environment resolved like:

import streamlit as st
import os

pip = os.popen('pip list').read()

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