Doc Extractor can't get anything form doc #7194

Closed
opened 2026-02-21 18:19:21 -05:00 by yindo · 4 comments
Owner

Originally created by @kelicblan on GitHub (Dec 13, 2024).

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 search for existing issues, 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

0.13.2

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

1、in the workflow, add a doc extractor, after the execution of the document is uploaded, the return is text: "";
2、build the Unstructured. IO service, apipost execution http://ip/general/v0/general can identify the document, Env config:
ETL_TYPE=Unstructured
UNSTRUCTURED_API_URL=http://ip/general/v0/general
UNSTRUCTURED_API_KEY=
SCARF_NO_ANALYTICS=true
nothing is change!Unstructured. IO was not invoked

✔️ Expected Behavior

let Unstructured working

Actual Behavior

No response

Originally created by @kelicblan on GitHub (Dec 13, 2024). ### 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 [search for existing issues](https://github.com/langgenius/dify/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 0.13.2 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce 1、in the workflow, add a doc extractor, after the execution of the document is uploaded, the return is text: ""; 2、build the Unstructured. IO service, apipost execution http://ip/general/v0/general can identify the document, Env config: ETL_TYPE=Unstructured UNSTRUCTURED_API_URL=http://ip/general/v0/general UNSTRUCTURED_API_KEY= SCARF_NO_ANALYTICS=true nothing is change!Unstructured. IO was not invoked ### ✔️ Expected Behavior let Unstructured working ### ❌ Actual Behavior _No response_
yindo added the 🌚 invalid🌊 feat:workflow labels 2026-02-21 18:19:21 -05:00
yindo closed this issue 2026-02-21 18:19:21 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 13, 2024):

Hello @kelicblan! I'm here to help you with any bugs, questions, or contributions you have for the project. If you need assistance, feel free to ask.

To address the issue where the Doc Extractor in Dify is not extracting text from documents, here are some troubleshooting steps and considerations:

  1. Check File Type Support: Ensure that the document type you are trying to extract text from is supported by the Doc Extractor. Supported file types include plain text, PDF, DOC/DOCX, CSV, Excel, PPT/PPTX, EPUB, EML, MSG, JSON, and YAML. If the file type is unsupported, the extractor will not work [1].

  2. Verify Unstructured.IO Configuration: Since you are using the Unstructured.IO service, ensure that the environment variables are correctly set:

    • ETL_TYPE should be set to Unstructured.
    • UNSTRUCTURED_API_URL should point to the correct API endpoint, e.g., http://ip/general/v0/general.
    • Ensure that the Unstructured.IO service is running and accessible from your Dify instance [2].
  3. Check for Errors in Logs: Look at the logs for any errors or warnings that might indicate why the Unstructured.IO service is not being invoked. This can provide clues if there are connectivity issues or misconfigurations.

  4. Test Unstructured.IO Independently: Since you mentioned that the Unstructured.IO service can identify the document when tested independently, ensure that the same configuration is applied within the Dify environment.

  5. Ensure Correct Variable Types: Make sure that the input variables to the Doc Extractor are of the correct type (ArrayFileSegment or FileSegment). Incorrect variable types can lead to failures in processing [1].

By following these steps, you should be able to identify and resolve the issue with the Doc Extractor not invoking the Unstructured.IO service.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Dec 13, 2024): <!-- Greeting --> Hello @kelicblan! I'm here to help you with any bugs, questions, or contributions you have for the project. If you need assistance, feel free to ask. <!-- Answer --> To address the issue where the Doc Extractor in Dify is not extracting text from documents, here are some troubleshooting steps and considerations: 1. **Check File Type Support**: Ensure that the document type you are trying to extract text from is supported by the Doc Extractor. Supported file types include plain text, PDF, DOC/DOCX, CSV, Excel, PPT/PPTX, EPUB, EML, MSG, JSON, and YAML. If the file type is unsupported, the extractor will not work <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/document_extractor/node.py)</sup>. 2. **Verify Unstructured.IO Configuration**: Since you are using the Unstructured.IO service, ensure that the environment variables are correctly set: - `ETL_TYPE` should be set to `Unstructured`. - `UNSTRUCTURED_API_URL` should point to the correct API endpoint, e.g., `http://ip/general/v0/general`. - Ensure that the Unstructured.IO service is running and accessible from your Dify instance <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/environments.md)</sup>. 3. **Check for Errors in Logs**: Look at the logs for any errors or warnings that might indicate why the Unstructured.IO service is not being invoked. This can provide clues if there are connectivity issues or misconfigurations. 4. **Test Unstructured.IO Independently**: Since you mentioned that the Unstructured.IO service can identify the document when tested independently, ensure that the same configuration is applied within the Dify environment. 5. **Ensure Correct Variable Types**: Make sure that the input variables to the Doc Extractor are of the correct type (`ArrayFileSegment` or `FileSegment`). Incorrect variable types can lead to failures in processing <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/document_extractor/node.py)</sup>. By following these steps, you should be able to identify and resolve the issue with the Doc Extractor not invoking the Unstructured.IO service. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/633631d7-5481-443b-921e-c408d48259d9?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/633631d7-5481-443b-921e-c408d48259d9?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/633631d7-5481-443b-921e-c408d48259d9?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/633631d7-5481-443b-921e-c408d48259d9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/633631d7-5481-443b-921e-c408d48259d9?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/633631d7-5481-443b-921e-c408d48259d9?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Dec 15, 2024):

If the document contains images only then it won't be able to extract things from it. You will get "" as expected.

@crazywoola commented on GitHub (Dec 15, 2024): If the document contains images only then it won't be able to extract things from it. You will get `""` as expected.
Author
Owner

@spytensor commented on GitHub (Dec 17, 2024):

@crazywoola hi, If I extract text from images and can also preview it. But when I "save & and process" , It turn to zero chunks? What is the reason? Is the content used for preview different with "save & and process" ?

@spytensor commented on GitHub (Dec 17, 2024): @crazywoola hi, If I extract text from images and can also preview it. But when I "save & and process" , It turn to zero chunks? What is the reason? Is the content used for preview different with "save & and process" ?
Author
Owner

@crazywoola commented on GitHub (Jan 12, 2025):

@crazywoola hi, If I extract text from images and can also preview it. But when I "save & and process" , It turn to zero chunks? What is the reason? Is the content used for preview different with "save & and process" ?

Maybe they are use the different program logic to do the embedding, if you use image for embedding, the there should be something like image_extractor otherwise it will use the default extractor. Anyway this is off topic.

@crazywoola commented on GitHub (Jan 12, 2025): > @crazywoola hi, If I extract text from images and can also preview it. But when I "save & and process" , It turn to zero chunks? What is the reason? Is the content used for preview different with "save & and process" ? Maybe they are use the different program logic to do the embedding, if you use image for embedding, the there should be something like `image_extractor` otherwise it will use the default extractor. Anyway this is off topic.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7194