🔎 Search before asking
🐛 Bug (问题描述)
Got TypeError: PaddlePredictorOption.__init__() takes 1 positional argument but 2 were given when init PaddleOCR.
Tried paddleocr==3.1.1 and paddleocr==3.1.0, they all have this issue.
The latest working version is paddleocr==3.0.1
🏃♂️ Environment (运行环境)
Using this image on windows: paddlepaddle/paddle:3.1.0-gpu-cuda11.8-cudnn8.9
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
Launch container
- docker run -it --rm --gpus all paddlepaddle/paddle:3.1.0-gpu-cuda11.8-cudnn8.9 bash
Run all the commands below in container:
- pip install paddleocr==3.1.1
For some reason these opencv related libs are missing, need to install them before import paddleocr
apt-get update
apt-get install -y libgl1 libglib2.0-0
Now launch python in terminal:
-
python
-
from paddleocr import PaddleOCR
-
ocr = PaddleOCR(use_doc_orientation_classify=False, use_doc_unwarping=False, use_textline_orientation=False)
Then error occurs:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/paddleocr/_pipelines/ocr.py", line 161, in __init__
super().__init__(**base_params)
File "/usr/local/lib/python3.10/dist-packages/paddleocr/_pipelines/base.py", line 66, in __init__
self.paddlex_pipeline = self._create_paddlex_pipeline()
File "/usr/local/lib/python3.10/dist-packages/paddleocr/_pipelines/base.py", line 99, in _create_paddlex_pipeline
kwargs = prepare_common_init_args(None, self._common_args)
File "/usr/local/lib/python3.10/dist-packages/paddleocr/_common_args.py", line 75, in prepare_common_init_args
pp_option = PaddlePredictorOption(
TypeError: PaddlePredictorOption.__init__() takes 1 positional argument but 2 were given
🔎 Search before asking
🐛 Bug (问题描述)
Got
TypeError: PaddlePredictorOption.__init__() takes 1 positional argument but 2 were givenwhen init PaddleOCR.Tried paddleocr==3.1.1 and paddleocr==3.1.0, they all have this issue.
The latest working version is paddleocr==3.0.1
🏃♂️ Environment (运行环境)
Using this image on windows: paddlepaddle/paddle:3.1.0-gpu-cuda11.8-cudnn8.9
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
Launch container
Run all the commands below in container:
For some reason these opencv related libs are missing, need to install them before import paddleocr
Now launch python in terminal:
python
from paddleocr import PaddleOCR
ocr = PaddleOCR(use_doc_orientation_classify=False, use_doc_unwarping=False, use_textline_orientation=False)
Then error occurs: