You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
Pleas do not modify this template :) and fill in all the required fields.
Dify version
0.6.5
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I need some variables to perform some calculations. If the value of the variable is 0, it will be null when I call it in the subsequent nodes, which will cause an error in the Python code calculation. Please refer to the picture.
✔️ Expected Behavior
0
❌ Actual Behavior
null
The text was updated successfully, but these errors were encountered:
The behavior you're encountering, where a variable with a value of 0 is treated as null in your Python code, could be due to how your code or the Dify framework you're using interprets numerical values, especially in conditions or functions designed to check for null or None values. It's crucial to ensure that your code differentiates between None (null in Python) and 0, as they have different meanings. Specifically, check the logic around any _assert_null or _assert_not_null methods or similar conditions that might mistakenly treat 0 as None.
To address this issue, review the initialization and handling of variables that can have a 0 value to ensure they are not inadvertently treated as None when passed through your workflow or calculations. This includes checking any custom logic that evaluates these variables before they are used in calculations or passed to functions that expect a non-null value.
If your setup is self-hosted using Docker, consider also reviewing your Docker configuration and how it interacts with Dify, although without more specific details on your Docker setup and the steps leading to the issue, it's challenging to provide a targeted solution. Ensure your Docker setup aligns with the recommended configurations as outlined in Dify's documentation.
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
Self Checks
Dify version
0.6.5
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I need some variables to perform some calculations. If the value of the variable is 0, it will be null when I call it in the subsequent nodes, which will cause an error in the Python code calculation. Please refer to the picture.
✔️ Expected Behavior
0
❌ Actual Behavior
null
The text was updated successfully, but these errors were encountered: