API error! #13610

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

Originally created by @igangz on GitHub (May 3, 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.3.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

API starup error log:

api-1  | Running migrations
api-1  | 2025-05-03 19:29:57.062 INFO [MainThread] [utils.py:162] - NumExpr defaulting to 4 threads.
api-1  | /app/api/.venv/lib/python3.12/site-packages/opik/evaluation/metrics/heuristics/regex_match.py:21: SyntaxWarning: invalid escape sequence '\d'
api-1  |   >>> regex_metric = RegexMatch(r"\d{3}-\d{2}-\d{4}")
api-1  | 2025-05-03 19:31:31.340 INFO [MainThread] [repository_registry.py:38] - Registering WorkflowNodeExecution repository with RDBMS storage
api-1  | Preparing database migration...
api-1  | Database migration skipped
api-1  | [2025-05-03 11:31:52 +0000] [1] [INFO] Starting gunicorn 23.0.0
api-1  | [2025-05-03 11:31:52 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
api-1  | [2025-05-03 11:31:52 +0000] [1] [INFO] Using worker: gevent
api-1  | [2025-05-03 11:31:52 +0000] [23] [INFO] Booting worker with pid: 23
api-1  | 2025-05-03 19:32:14.102 INFO [MainThread] [utils.py:162] - NumExpr defaulting to 4 threads.
api-1  | 2025-05-03 19:32:46.578 INFO [MainThread] [repository_registry.py:38] - Registering WorkflowNodeExecution repository with RDBMS storage
api-1  | 2025-05-03 19:34:37.285 ERROR [Dummy-1] [plugin_service.py:86] - failed to fetch latest plugin version
api-1  | Traceback (most recent call last):
api-1  |   File "/app/api/services/plugin/plugin_service.py", line 59, in fetch_latest_plugin_version
api-1  |     for manifest in marketplace.batch_fetch_plugin_manifests(cache_not_exists)
api-1  |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1  |   File "/app/api/core/helper/marketplace.py", line 29, in batch_fetch_plugin_manifests
api-1  |     return [MarketplacePluginDeclaration(**plugin) for plugin in response.json()["data"]["plugins"]]
api-1  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1  |   File "/app/api/.venv/lib/python3.12/site-packages/pydantic/main.py", line 212, in __init__
api-1  |     validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
api-1  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1  | pydantic_core._pydantic_core.ValidationError: 1 validation error for MarketplacePluginDeclaration
api-1  | model.position.text_embedding
api-1  |   Input should be a valid list [type=list_type, input_value=None, input_type=NoneType]
api-1  |     For further information visit https://errors.pydantic.dev/2.9/v/list_type

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @igangz on GitHub (May 3, 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.3.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce API starup error log: ``` api-1 | Running migrations api-1 | 2025-05-03 19:29:57.062 INFO [MainThread] [utils.py:162] - NumExpr defaulting to 4 threads. api-1 | /app/api/.venv/lib/python3.12/site-packages/opik/evaluation/metrics/heuristics/regex_match.py:21: SyntaxWarning: invalid escape sequence '\d' api-1 | >>> regex_metric = RegexMatch(r"\d{3}-\d{2}-\d{4}") api-1 | 2025-05-03 19:31:31.340 INFO [MainThread] [repository_registry.py:38] - Registering WorkflowNodeExecution repository with RDBMS storage api-1 | Preparing database migration... api-1 | Database migration skipped api-1 | [2025-05-03 11:31:52 +0000] [1] [INFO] Starting gunicorn 23.0.0 api-1 | [2025-05-03 11:31:52 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1) api-1 | [2025-05-03 11:31:52 +0000] [1] [INFO] Using worker: gevent api-1 | [2025-05-03 11:31:52 +0000] [23] [INFO] Booting worker with pid: 23 api-1 | 2025-05-03 19:32:14.102 INFO [MainThread] [utils.py:162] - NumExpr defaulting to 4 threads. api-1 | 2025-05-03 19:32:46.578 INFO [MainThread] [repository_registry.py:38] - Registering WorkflowNodeExecution repository with RDBMS storage api-1 | 2025-05-03 19:34:37.285 ERROR [Dummy-1] [plugin_service.py:86] - failed to fetch latest plugin version api-1 | Traceback (most recent call last): api-1 | File "/app/api/services/plugin/plugin_service.py", line 59, in fetch_latest_plugin_version api-1 | for manifest in marketplace.batch_fetch_plugin_manifests(cache_not_exists) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/core/helper/marketplace.py", line 29, in batch_fetch_plugin_manifests api-1 | return [MarketplacePluginDeclaration(**plugin) for plugin in response.json()["data"]["plugins"]] api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | File "/app/api/.venv/lib/python3.12/site-packages/pydantic/main.py", line 212, in __init__ api-1 | validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ api-1 | pydantic_core._pydantic_core.ValidationError: 1 validation error for MarketplacePluginDeclaration api-1 | model.position.text_embedding api-1 | Input should be a valid list [type=list_type, input_value=None, input_type=NoneType] api-1 | For further information visit https://errors.pydantic.dev/2.9/v/list_type ``` ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 19:12:59 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (May 3, 2025):

Hello @igangang! I'm Dosu, your friendly bot here to help you with bugs, questions, and becoming a contributor. I'm here to assist you while you wait for a human maintainer. How can I help you today?

I found a similar open issue related to a plugin error in the Dify repository, but no solution was found in the comments [1].

Regarding the error you're encountering, it seems to be a ValidationError in Pydantic, specifically indicating that the model.position.text_embedding field should be a valid list, but it received a NoneType instead. This typically happens when the data structure expected by the MarketplacePluginDeclaration class does not match the actual data received from the API.

To resolve this issue, you can:

  1. Check the API Response: Ensure that the API response from the marketplace contains the expected structure and that the text_embedding field is indeed a list. If the API response is incorrect, you may need to handle this case in your code or report it to the API provider.

  2. Modify the Pydantic Model: If the API response is correct but the model is too strict, consider adjusting the Pydantic model to allow for optional fields or provide default values.

  3. Debug the Data Flow: Add logging or debugging statements to inspect the data being passed to the MarketplacePluginDeclaration to ensure it matches the expected format.

These steps should help you identify and fix the root cause of the validation error.

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 (May 3, 2025): <!-- Greeting --> Hello @igangang! I'm [Dosu](https://dosu.dev), your friendly bot here to help you with bugs, questions, and becoming a contributor. I'm here to assist you while you wait for a human maintainer. How can I help you today? <!-- Answer --> I found a similar open issue related to a plugin error in the Dify repository, but no solution was found in the comments <sup>[[1]](https://github.com/langgenius/dify/issues/16616)</sup>. Regarding the error you're encountering, it seems to be a `ValidationError` in Pydantic, specifically indicating that the `model.position.text_embedding` field should be a valid list, but it received a `NoneType` instead. This typically happens when the data structure expected by the `MarketplacePluginDeclaration` class does not match the actual data received from the API. To resolve this issue, you can: 1. **Check the API Response**: Ensure that the API response from the marketplace contains the expected structure and that the `text_embedding` field is indeed a list. If the API response is incorrect, you may need to handle this case in your code or report it to the API provider. 2. **Modify the Pydantic Model**: If the API response is correct but the model is too strict, consider adjusting the Pydantic model to allow for optional fields or provide default values. 3. **Debug the Data Flow**: Add logging or debugging statements to inspect the data being passed to the `MarketplacePluginDeclaration` to ensure it matches the expected format. These steps should help you identify and fix the root cause of the validation error. <!-- 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/ed6b0a14-e029-42f6-b832-c7fcc94ff1a2?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/ed6b0a14-e029-42f6-b832-c7fcc94ff1a2?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/ed6b0a14-e029-42f6-b832-c7fcc94ff1a2?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/ed6b0a14-e029-42f6-b832-c7fcc94ff1a2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ed6b0a14-e029-42f6-b832-c7fcc94ff1a2?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/ed6b0a14-e029-42f6-b832-c7fcc94ff1a2?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ed6b0a14-e029-42f6-b832-c7fcc94ff1a2?feedback_type=other)</sup>
Author
Owner

@igangz commented on GitHub (May 3, 2025):

This have 2 errors:

  1. /app/api/.venv/lib/python3.12/site-packages/opik/evaluation/metrics/heuristics/regex_match.py:21: SyntaxWarning: invalid escape sequence '\d'
  2. [Dummy-1] [plugin_service.py:86] - failed to fetch latest plugin version
@igangz commented on GitHub (May 3, 2025): This have 2 errors: 1. `/app/api/.venv/lib/python3.12/site-packages/opik/evaluation/metrics/heuristics/regex_match.py:21: SyntaxWarning: invalid escape sequence '\d'` 2. `[Dummy-1] [plugin_service.py:86] - failed to fetch latest plugin version`
Author
Owner

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

2025-05-05 07:53:37,533 ERROR [plugin_service.py:86] 38f113a36a failed to fetch latest plugin version
Traceback (most recent call last):
  File "/Users/chenghaishan/work/dify_projects/dify/api/services/plugin/plugin_service.py", line 59, in fetch_latest_plugin_version
    for manifest in marketplace.batch_fetch_plugin_manifests(cache_not_exists)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenghaishan/work/dify_projects/dify/api/core/helper/marketplace.py", line 29, in batch_fetch_plugin_manifests
    return [MarketplacePluginDeclaration(**plugin) for plugin in response.json()["data"]["plugins"]]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenghaishan/work/dify_projects/dify/api/.venv/lib/python3.12/site-packages/pydantic/main.py", line 212, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for MarketplacePluginDeclaration
model.position.text_embedding
  Input should be a valid list [type=list_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.9/v/list_type。

我也遇到了同样的错误,请问这个有升级处置的计划吗?

@chssandy commented on GitHub (May 5, 2025): ``` 2025-05-05 07:53:37,533 ERROR [plugin_service.py:86] 38f113a36a failed to fetch latest plugin version Traceback (most recent call last): File "/Users/chenghaishan/work/dify_projects/dify/api/services/plugin/plugin_service.py", line 59, in fetch_latest_plugin_version for manifest in marketplace.batch_fetch_plugin_manifests(cache_not_exists) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/chenghaishan/work/dify_projects/dify/api/core/helper/marketplace.py", line 29, in batch_fetch_plugin_manifests return [MarketplacePluginDeclaration(**plugin) for plugin in response.json()["data"]["plugins"]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/chenghaishan/work/dify_projects/dify/api/.venv/lib/python3.12/site-packages/pydantic/main.py", line 212, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pydantic_core._pydantic_core.ValidationError: 1 validation error for MarketplacePluginDeclaration model.position.text_embedding Input should be a valid list [type=list_type, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.9/v/list_type。 ``` 我也遇到了同样的错误,请问这个有升级处置的计划吗?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13610