The previous application encountered various variable errors after upgrading to version 0.10.0. #6319

Closed
opened 2026-02-21 18:15:11 -05:00 by yindo · 3 comments
Owner

Originally created by @Moiyu1998 on GitHub (Oct 24, 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.10.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The workflow application that was working fine in the previous version encountered errors with most variables after updating to version 0.10.0.

lQLPJxdbxn4UecfMxM0K0rByKCqfh4X0VQcA9i-UWK4A_2770_196 ca1173b379e35b6fffb70727b41f51c0

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @Moiyu1998 on GitHub (Oct 24, 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.10.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce The workflow application that was working fine in the previous version encountered errors with most variables after updating to version 0.10.0. <img width="1385" alt="lQLPJxdbxn4UecfMxM0K0rByKCqfh4X0VQcA9i-UWK4A_2770_196" src="https://github.com/user-attachments/assets/09907d97-8e87-48af-b370-8e304c45c5ee"> <img width="380" alt="ca1173b379e35b6fffb70727b41f51c0" src="https://github.com/user-attachments/assets/c439965a-a418-43dc-8972-f86fe8b9f413"> ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:15:11 -05:00
yindo closed this issue 2026-02-21 18:15:12 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 24, 2024):

To resolve the Pydantic validation errors you're encountering after upgrading to version 0.10.0, you can address the issues with None values for the description, options, and vision.configs fields as follows:

  1. description and options Fields:

    • Ensure that these fields are not None by providing default values or handling None values in your code. These fields should be valid strings and sequences, respectively.
  2. vision.configs Field:

    • Use a field_validator to handle None values for the configs field in the VisionConfig class. Here's an example of how you can implement this:
    class VisionConfig(BaseModel):
        enabled: bool = False
        configs: VisionConfigOptions = Field(default_factory=VisionConfigOptions)
    
        @field_validator("configs", mode="before")
        @classmethod
        def convert_none_configs(cls, v: Any):
            if v is None:
                return VisionConfigOptions()
            return v
    

    This validator ensures that if configs is None, it will be replaced with a default VisionConfigOptions object, preventing validation errors related to None values [1].

Make sure these validators are correctly applied and that the VisionConfig is instantiated properly in your code. This should help resolve the validation issues you're facing.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 24, 2024): <!-- Answer --> To resolve the Pydantic validation errors you're encountering after upgrading to version 0.10.0, you can address the issues with `None` values for the `description`, `options`, and `vision.configs` fields as follows: 1. **`description` and `options` Fields:** - Ensure that these fields are not `None` by providing default values or handling `None` values in your code. These fields should be valid strings and sequences, respectively. 2. **`vision.configs` Field:** - Use a `field_validator` to handle `None` values for the `configs` field in the `VisionConfig` class. Here's an example of how you can implement this: ```python class VisionConfig(BaseModel): enabled: bool = False configs: VisionConfigOptions = Field(default_factory=VisionConfigOptions) @field_validator("configs", mode="before") @classmethod def convert_none_configs(cls, v: Any): if v is None: return VisionConfigOptions() return v ``` This validator ensures that if `configs` is `None`, it will be replaced with a default `VisionConfigOptions` object, preventing validation errors related to `None` values <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/llm/entities.py)</sup>. Make sure these validators are correctly applied and that the `VisionConfig` is instantiated properly in your code. This should help resolve the validation issues you're facing. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@Moiyu1998 commented on GitHub (Oct 24, 2024):

The error occurs in one personal space but not in another. Why is that?

@Moiyu1998 commented on GitHub (Oct 24, 2024): The error occurs in one personal space but not in another. Why is that?
Author
Owner

@crazywoola commented on GitHub (Oct 24, 2024):

Please upgrade to v0.10.1, this version should resolve those errors.

@crazywoola commented on GitHub (Oct 24, 2024): Please upgrade to v0.10.1, this version should resolve those errors.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6319