docling icon indicating copy to clipboard operation
docling copied to clipboard

Basic usage not working for me

Open aevo98765 opened this issue 1 year ago • 0 comments

Question

I have the following python code:

def simple_conversion():
    source = "docling.pdf"

    converter = DocumentConverter()

    result = converter.convert(source)

...

I get the following stack trace everytime I try to run any docling convert job. Help would be greatly appreciated.

result = converter.convert(source)
         ^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/pydantic/_internal/_validate_call.py", line 38, in wrapper_function return wrapper(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/pydantic/_internal/_validate_call.py", line 111, in call res = self.pydantic_validator.validate_python(pydantic_core.ArgsKwargs(args, kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/docling/document_converter.py", line 172, in convert return next(all_res) ^^^^^^^^^^^^^ File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/docling/document_converter.py", line 193, in convert_all for conv_res in conv_res_iter: File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/docling/document_converter.py", line 228, in _convert for item in map( File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/docling/document_converter.py", line 269, in _process_document conv_res = self._execute_pipeline(in_doc, raises_on_error=raises_on_error) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/docling/document_converter.py", line 290, in _execute_pipeline pipeline = self._get_pipeline(in_doc.format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/docling/document_converter.py", line 256, in _get_pipeline self.initialized_pipelines[pipeline_class] = pipeline_class( ^^^^^^^^^^^^^^^ File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/docling/pipeline/standard_pdf_pipeline.py", line 61, in init if (ocr_model := self.get_ocr_model()) is None: ^^^^^^^^^^^^^^^^^^^^ File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/docling/pipeline/standard_pdf_pipeline.py", line 114, in get_ocr_model return EasyOcrModel( ^^^^^^^^^^^^^ File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/docling/models/easyocr_model.py", line 34, in init self.reader = easyocr.Reader( ^^^^^^^^^^^^^^^ File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/easyocr/easyocr.py", line 92, in init detector_path = self.getDetectorPath(detect_network) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/easyocr/easyocr.py", line 253, in getDetectorPath download_and_unzip(self.detection_models[self.detect_network]['url'], self.detection_models[self.detect_network]['filename'], self.model_storage_directory, self.verbose) File "/Users/x/Documents/Projects/agentic-projects/docling-domain-expert/venv/lib/python3.11/site-packages/easyocr/utils.py", line 628, in download_and_unzip urlretrieve(url, zip_path, reporthook=reporthook) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 241, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: ^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 216, in urlopen return opener.open(url, data, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 519, in open response = self._open(req, data) ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 536, in _open result = self._call_chain(self.handle_open, protocol, protocol + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 496, in _call_chain result = func(*args) ^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1391, in https_open return self.do_open(http.client.HTTPSConnection, req, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1351, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)>

aevo98765 avatar Dec 10 '24 21:12 aevo98765