You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kreuzberg\_ocr\_paddleocr.py:242:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv\Lib\site-packages\paddleocr\__init__.py:14: in <module>
from .paddleocr import (
.venv\Lib\site-packages\paddleocr\paddleocr.py:21: in <module>
from paddle.utils import try_import
.venv\Lib\site-packages\paddle\__init__.py:38: in <module>
from .base import core # noqa: F401
.venv\Lib\site-packages\paddle\base\__init__.py:38: in <module>
from . import ( # noqa: F401
.venv\Lib\site-packages\paddle\base\dataset.py:23: in <module>
from ..utils import deprecated
.venv\Lib\site-packages\paddle\utils\__init__.py:16: in <module>
from . import ( # noqa: F401
.venv\Lib\site-packages\paddle\utils\cpp_extension\__init__.py:15: in <module>
from .cpp_extension import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# isort: skip_file
from __future__ import annotations
from typing import TYPE_CHECKING, Any
import os
import copy
import concurrent
import re
> import setuptools
E ModuleNotFoundError: No module named 'setuptools'
.venv\Lib\site-packages\paddle\utils\cpp_extension\cpp_extension.py:23: ModuleNotFoundError
The above exception was the direct cause of the following exception:
backend = <kreuzberg._ocr._paddleocr.PaddleBackend object at 0x000001DE22318290>
mock_find_spec = <MagicMock name='find_spec' id='205356[805](https://github.com/Goldziher/kreuzberg/actions/runs/13844252481/job/38738917361?pr=27#step:11:806)0640'>
@pytest.mark.anyio
@pytest.mark.skipif(sys.version_info > (3, 12), reason="paddle does not support python 3.13 yet")
async def test_init_paddle_ocr_initialization_error(backend: PaddleBackend, mock_find_spec: Mock) -> None:
"""Test handling initialization errors."""
PaddleBackend._paddle_ocr = None
async def mock_run_sync_error(*args: Any, **_: Any) -> None:
if args and args[0].__name__ == "PaddleOCR":
raise Exception("Initialization error")
with patch("kreuzberg._ocr._paddleocr.run_sync", side_effect=mock_run_sync_error):
with pytest.raises(OCRError) as excinfo:
> await backend._init_paddle_ocr()
tests\ocr\paddleocr_test.py:234:
其他补充信息 Additional Supplementary Information
No response
The text was updated successfully, but these errors were encountered:
bug描述 Describe the Bug
Look here:
Paddle/python/paddle/utils/cpp_extension/cpp_extension.py
Line 23 in 91a62d6
I am getting the following error in CI:
其他补充信息 Additional Supplementary Information
No response
The text was updated successfully, but these errors were encountered: