On an Ubuntu virtual machine created in VM (Virtual Machine), after deploying Dify using Docker Compose, an error occurred when using the document extractor in the workflow. #12405

Closed
opened 2026-02-21 19:07:16 -05:00 by yindo · 3 comments
Owner

Originally created by @swbjy123 on GitHub (Mar 31, 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 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

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

After deploying Dify using Docker Compose on an Ubuntu virtual machine created in VM, when using the document extractor in the workflow, the file content can be correctly extracted if the local file upload method is used. However, an error occurs when attempting to extract file content using the URL method.
“1 validation error for File Value error, Invalid file url [type=value_error, input_value={'id': None, 'tenant_id':...y__file__', 'url': None}, input_type=dict] For further information visit https://errors.pydantic.dev/2.9/v/value_error

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @swbjy123 on GitHub (Mar 31, 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 [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 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce After deploying Dify using Docker Compose on an Ubuntu virtual machine created in VM, when using the document extractor in the workflow, the file content can be correctly extracted if the local file upload method is used. However, an error occurs when attempting to extract file content using the URL method. “1 validation error for File Value error, Invalid file url [type=value_error, input_value={'id': None, 'tenant_id':...y__file__', 'url': None}, input_type=dict] For further information visit https://errors.pydantic.dev/2.9/v/value_error ” ![Image](https://github.com/user-attachments/assets/15595b85-99c0-4b33-9541-069c01231f55) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🌊 feat:workflow label 2026-02-21 19:07:16 -05:00
yindo closed this issue 2026-02-21 19:07:16 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 31, 2025):

@swbjy123 Hello there! I'm here to help you with any bugs, questions, or contributions you have regarding Dify. Let's work together to solve the issue you're experiencing.

To resolve the "Invalid file URL" validation error when using the document extractor with the URL method in Dify, ensure that there are no spaces in the URL. Additionally, if you are encountering a Pydantic URL validation error in Dify v0.14.0 Docker setup, you can fix it by adding the following line to your docker/.env file:

CODE_EXECUTION_ENDPOINT=http://127.0.0.1:8194

This adjustment should help in resolving URL validation issues related to the Docker setup. Furthermore, if you are using OpenRouter models (like GPT-4o), be aware that there is a known compatibility issue with the OpenRouter plugin that can cause image uploads to fail with a 400 error indicating an invalid file URL. This issue is specific to the OpenRouter plugin integration [1][2][3].

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Mar 31, 2025): <!-- Greeting --> @swbjy123 Hello there! I'm here to help you with any bugs, questions, or contributions you have regarding Dify. Let's work together to solve the issue you're experiencing. <!-- Answer --> To resolve the "Invalid file URL" validation error when using the document extractor with the URL method in Dify, ensure that there are no spaces in the URL. Additionally, if you are encountering a Pydantic URL validation error in Dify v0.14.0 Docker setup, you can fix it by adding the following line to your `docker/.env` file: ``` CODE_EXECUTION_ENDPOINT=http://127.0.0.1:8194 ``` This adjustment should help in resolving URL validation issues related to the Docker setup. Furthermore, if you are using OpenRouter models (like GPT-4o), be aware that there is a known compatibility issue with the OpenRouter plugin that can cause image uploads to fail with a 400 error indicating an invalid file URL. This issue is specific to the OpenRouter plugin integration <sup>[[1]](https://github.com/langgenius/dify/issues/16700)</sup><sup>[[2]](https://github.com/langgenius/dify/issues/11788)</sup><sup>[[3]](https://github.com/langgenius/dify/issues/16816)</sup>. <!-- 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/ea53ad8a-e426-4d3f-91ba-cf40b134517b?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/ea53ad8a-e426-4d3f-91ba-cf40b134517b?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/ea53ad8a-e426-4d3f-91ba-cf40b134517b?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/ea53ad8a-e426-4d3f-91ba-cf40b134517b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ea53ad8a-e426-4d3f-91ba-cf40b134517b?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/ea53ad8a-e426-4d3f-91ba-cf40b134517b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ea53ad8a-e426-4d3f-91ba-cf40b134517b?feedback_type=other)</sup>
Author
Owner

@swbjy123 commented on GitHub (Mar 31, 2025):

@dosu.

The problem hasn't been solved.

@swbjy123 commented on GitHub (Mar 31, 2025): @dosu. The problem hasn't been solved.
Author
Owner

@dosubot[bot] commented on GitHub (Mar 31, 2025):

To further troubleshoot the "Invalid file URL" error in Dify, ensure the following:

  1. URL Format: Double-check that the URL is a complete, valid external URL without spaces. It should start with 'http' or 'ftp' and match the regex pattern ^(https?|ftp):\/\/ [1].

  2. Docker Configuration: Verify that the FILES_URL in your .env file is correctly set to 'http://your-ip'. This URL should be externally accessible if you are using URL mode for multi-modal inputs [2].

  3. OpenRouter Plugin: If you are using OpenRouter models, consider checking for updates or alternative configurations, as there is a known compatibility issue that might cause this error [3].

If these steps do not resolve the issue, please provide more details about the specific configuration or any error logs you might have.

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Mar 31, 2025): <!-- Answer --> To further troubleshoot the "Invalid file URL" error in Dify, ensure the following: 1. **URL Format**: Double-check that the URL is a complete, valid external URL without spaces. It should start with 'http' or 'ftp' and match the regex pattern `^(https?|ftp):\/\/` <sup>[[1]](https://github.com/langgenius/dify/issues/14143)</sup>. 2. **Docker Configuration**: Verify that the `FILES_URL` in your `.env` file is correctly set to `'http://your-ip'`. This URL should be externally accessible if you are using URL mode for multi-modal inputs <sup>[[2]](https://github.com/langgenius/dify/issues/16327)</sup>. 3. **OpenRouter Plugin**: If you are using OpenRouter models, consider checking for updates or alternative configurations, as there is a known compatibility issue that might cause this error <sup>[[3]](https://github.com/langgenius/dify/issues/16700)</sup>. If these steps do not resolve the issue, please provide more details about the specific configuration or any error logs you might have. <!-- 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/b5f20d56-0597-44bf-a8ef-50f10a80278b?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/b5f20d56-0597-44bf-a8ef-50f10a80278b?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/b5f20d56-0597-44bf-a8ef-50f10a80278b?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/b5f20d56-0597-44bf-a8ef-50f10a80278b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b5f20d56-0597-44bf-a8ef-50f10a80278b?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/b5f20d56-0597-44bf-a8ef-50f10a80278b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b5f20d56-0597-44bf-a8ef-50f10a80278b?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12405