Bug: Support XLSX Mimetype#88
Merged
cau-git merged 3 commits intodocling-project:mainfrom Dec 9, 2024
Merged
Conversation
Signed-off-by: Andrew Tran <48397302+ctandrewtran@users.noreply.github.com>
Signed-off-by: Andrew Tran <48397302+ctandrewtran@users.noreply.github.com>
Member
|
@ctandrewtran can you please provide a few more details on the failure that you observed?
|
Contributor
Author
OS: Amazon Linux 2 Kernel Version: 5.10.228-219.884.amzn2.x86_64 Python Version: 3.12.6 Specific file: any .xlsx file that will have mimetype Note: On my end I implemented the change done in this PR in the docling-core package manually in my environment and it did indeed fix the problem. Code: from docling import *
import streamlit as st
import io
file = st.file_uploader(type=['xlsx'])
arti = docling.pipeline.standard_pdf_pipeline.StandardPdfPipeline.download_models_hf()
pipelinePDF = docling.datampdel.pipeline_options.PdfPipelineOptions(artifacts_path=arti)
converter = docling.document_converter.DocumentConverter(allowed_formats=[docling.InputFormat.XLSX])
buf = io.BytesIO(file.read())
src = docling.datamodel.base_models.DocumentStream(name=file.name, stream=buf)
doclingified = converter.convert(src)
|
Contributor
Author
Closing the loop, someone else in the issue I raised in the Docling Repo mentioned having the same bug |
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
cau-git
approved these changes
Dec 9, 2024
muhark
added a commit
to muhark/docling-core
that referenced
this pull request
Mar 19, 2025
Signed-off-by: Andrew Tran <48397302+ctandrewtran@users.noreply.github.com> Signed-off-by: Christoph Auer <cau@zurich.ibm.com> Co-authored-by: Christoph Auer <cau@zurich.ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Using latest docling-core (v2.6.1) and docling (v2.8.1) xlsx files are unable to be processed due to a ValueError mentioning that the mimetype
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"is not valid as per DocumentOrigin"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"is not a mimetype offered by default by themimetypepkg being used by docling and hence has to be added in the extras sectionFix
Add the mimetype as an extra mimetype