MinerU plugin encountered an error in extracting doc and docx files #241

Closed
opened 2026-02-16 10:18:34 -05:00 by yindo · 7 comments
Owner

Originally created by @moncat2005 on GitHub (Apr 30, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.2.0

Plugin version

minerU 0.2.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The miner U plugin itself displays the ability to extract doc or docx documents.

Image

1.when extracting the docx file, an error was found: "Failed to parse file. result: f " error \ ": " Error locating Libreoffice: Libreoffice not found.

Image

My testing environment is Docker Desktop under WIN11.
Dify and Mineru API are both deployed using Docker,
How should the required liberoffice be installed so that it can be correctly called by plugins?

2.An error was found while extracting the doc file: Detected file type does not match thespecified type. Please verify the file.

Image

✔️ Error log

Image

Image

Originally created by @moncat2005 on GitHub (Apr 30, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.2.0 ### Plugin version minerU 0.2.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce The miner U plugin itself displays the ability to extract doc or docx documents. ![Image](https://github.com/user-attachments/assets/b0e586bd-65c8-4880-ac9e-0fb6ada80705) 1.when extracting the docx file, an error was found: "Failed to parse file. result: f \" error \ ": \" Error locating Libreoffice: Libreoffice not found. ![Image](https://github.com/user-attachments/assets/f4d88f43-958f-441a-a4e1-d2f86e96ebca) My testing environment is Docker Desktop under WIN11. Dify and Mineru API are both deployed using Docker, How should the required liberoffice be installed so that it can be correctly called by plugins? 2.An error was found while extracting the doc file: Detected file type does not match thespecified type. Please verify the file. ![Image](https://github.com/user-attachments/assets/74a24a23-255a-49c4-9517-15b73fc7de94) ### ✔️ Error log ![Image](https://github.com/user-attachments/assets/f4d88f43-958f-441a-a4e1-d2f86e96ebca) ![Image](https://github.com/user-attachments/assets/74a24a23-255a-49c4-9517-15b73fc7de94)
yindo added the bug label 2026-02-16 10:18:34 -05:00
yindo closed this issue 2026-02-16 10:18:34 -05:00
Author
Owner

@hjlarry commented on GitHub (May 5, 2025):

Image
this works for me

@hjlarry commented on GitHub (May 5, 2025): ![Image](https://github.com/user-attachments/assets/bcd9f1ed-1c50-4f60-af44-94ab7097c0b4) this works for me
Author
Owner

@moncat2005 commented on GitHub (May 6, 2025):

@hjlarry Thank you!

I tried installing libreoffice inside the container
Testing docx file extraction no longer reports error messages for missing libreoffice

However, an error still occurs when extracting the doc file:
Detected file type does not match thespecified type. Please verify the file.
This is the same error message as the default file extractor node when processing DOC files

It seems that the Mineru plugin uses LibreOffice to extract and process docx.
When processing doc files, the same processing method as the default file extractor is used, which prompts for file format errors.

I don't know if the description of the support for extracting document formats in Mineru's plugin is incorrect.

In actual workflow, should we optimize the branch flow of file format judgment conditions

  1. When processing docx files, use the default file extractor for quick processing to bypass the time-consuming PDF processing workflow.
  2. To process DOC files, it is necessary to optimize the miner U plugin to call libreoffice to support content extraction.
@moncat2005 commented on GitHub (May 6, 2025): @hjlarry Thank you! I tried installing libreoffice inside the container Testing docx file extraction no longer reports error messages for missing libreoffice However, an error still occurs when extracting the doc file: `Detected file type does not match thespecified type. Please verify the file.` This is the same error message as the default file extractor node when processing DOC files It seems that the Mineru plugin uses LibreOffice to extract and process docx. When processing doc files, the same processing method as the default file extractor is used, which prompts for file format errors. I don't know if the description of the support for extracting document formats in Mineru's plugin is incorrect. In actual workflow, should we optimize the branch flow of file format judgment conditions 1. When processing docx files, use the default file extractor for quick processing to bypass the time-consuming PDF processing workflow. 2. To process DOC files, it is necessary to optimize the miner U plugin to call libreoffice to support content extraction.
Author
Owner

@hjlarry commented on GitHub (May 6, 2025):

Image

The DOC file works fine for me.

The file extractor node uses the docx library to process DOCX files and leverages the unstructured API to handle DOC files. It seems unrelated to LibreOffice.

The "Detected file type..." error likely indicates that your file variable is not configured properly.

@hjlarry commented on GitHub (May 6, 2025): ![Image](https://github.com/user-attachments/assets/6b91dfdf-a0c4-4b27-8ae5-47ec076069ad) The DOC file works fine for me. The file extractor node uses the `docx` library to process DOCX files and leverages the unstructured API to handle DOC files. It seems unrelated to `LibreOffice`. The "Detected file type..." error likely indicates that your file variable is not configured properly.
Author
Owner

@moncat2005 commented on GitHub (May 6, 2025):

I think there may be some configuration errors on my part.
Could you please help point them out?
Thank you.

My workflow configuration starting node is as follows:

Image

Image

Image

From the final execution error, it seems that the starting node reported an error.
I am currently in version 1.2.0, do I need to upgrade to dify version 1.3.1?

@moncat2005 commented on GitHub (May 6, 2025): I think there may be some configuration errors on my part. Could you please help point them out? Thank you. My workflow configuration starting node is as follows: ![Image](https://github.com/user-attachments/assets/86642c58-4549-4557-affc-06baf88f9a2a) ![Image](https://github.com/user-attachments/assets/b7cb1855-2b53-4a4e-b565-83d49d9106aa) ![Image](https://github.com/user-attachments/assets/72d03c15-b1d3-4791-adbe-8e24146d859b) From the final execution error, it seems that the starting node reported an error. I am currently in version 1.2.0, do I need to upgrade to dify version 1.3.1?
Author
Owner

@hjlarry commented on GitHub (May 6, 2025):

Your configuration looks fine, but it's difficult to pinpoint the issue without debugging. You might try:

  1. Create a new workflow that simply takes a file as input and outputs the same file.
  2. Change the file type to "other" and specify the extension as .doc.
@hjlarry commented on GitHub (May 6, 2025): Your configuration looks fine, but it's difficult to pinpoint the issue without debugging. You might try: 1. Create a new workflow that simply takes a file as input and outputs the same file. 2. Change the file type to "other" and specify the extension as `.doc`.
Author
Owner

@moncat2005 commented on GitHub (May 6, 2025):

Thank you very much for your guidance!

Based on your guidance, I have specified the formats doc for other file types.
The test no longer reports errors, and the process can proceed.
It seems that the recognition of DOC format uploaded files is missing in the starting node function of dify1.2.0.

I will upgrade to 1.3.1 later and verify the recognition function of the starting node for the default doc file format again.

@moncat2005 commented on GitHub (May 6, 2025): Thank you very much for your guidance! Based on your guidance, I have specified the formats doc for other file types. The test no longer reports errors, and the process can proceed. It seems that the recognition of DOC format uploaded files is missing in the starting node function of dify1.2.0. I will upgrade to 1.3.1 later and verify the recognition function of the starting node for the default doc file format again.
Author
Owner

@moncat2005 commented on GitHub (May 6, 2025):

Confirmation information:
After upgrading to version 1.3.1 of dify, configure the upload file format on the start node to select the default file format for various types (including doc format).
When uploading the DOC format file again and executing the workflow, it has been processed normally and no more errors are reported.

@moncat2005 commented on GitHub (May 6, 2025): Confirmation information: After upgrading to version 1.3.1 of dify, configure the upload file format on the start node to select the default file format for various types (including doc format). When uploading the DOC format file again and executing the workflow, it has been processed normally and no more errors are reported.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#241