docling icon indicating copy to clipboard operation
docling copied to clipboard

RuntimeError: [json.exception.type_error.302] type must be string, but is object

Open duongkstn opened this issue 2 months ago • 3 comments

Bug

I got the error RuntimeError: [json.exception.type_error.302] type must be string, but is object image

Steps to reproduce

from docling.document_converter import DocumentConverter, PdfFormatOption
from docling.datamodel.base_models import InputFormat
from docling.datamodel.pipeline_options import PdfPipelineOptions, TesseractCliOcrOptions, TesseractOcrOptions
from docling.backend.docling_parse_v2_backend import DoclingParseV2DocumentBackend
from docling.backend.docling_parse_backend import DoclingParseDocumentBackend

source = "<path to file pdf>"

pipeline_options = PdfPipelineOptions()
pipeline_options.do_ocr = False
pipeline_options.do_table_structure = True
pipeline_options.table_structure_options.mode = "accurate"
pipeline_options.table_structure_options.do_cell_matching = True

dl_doc = DocumentConverter(format_options={
    InputFormat.PDF: PdfFormatOption(
                pipeline_options=pipeline_options, # pipeline options go here.
                backend=DoclingParseV2DocumentBackend # optional: pick an alternative backend
                
            )}).convert(source).document

I can not share my PDF file

Docling version

docling==2.7.0

Python version

python 3.10, Ubuntu 22.04

duongkstn avatar Nov 26 '24 09:11 duongkstn