When the value of the variable is 0, the variable is treated as null, resulting in an error in the Python calculation. #2932

Closed
opened 2026-02-21 17:51:47 -05:00 by yindo · 0 comments
Owner

Originally created by @zswll2 on GitHub (May 5, 2024).

Originally assigned to: @takatost on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a quesion, 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).
  • 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

IMG_7550
IMG_7549
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

Originally created by @zswll2 on GitHub (May 5, 2024). Originally assigned to: @takatost on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a quesion, 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] 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 ![IMG_7550](https://github.com/langgenius/dify/assets/37688676/0b2791f2-adcb-417f-aa4e-b34376a15802) ![IMG_7549](https://github.com/langgenius/dify/assets/37688676/92cdcdc1-4f4f-4ba2-8e88-9e196a549883) 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
yindo added the 🐞 bug label 2026-02-21 17:51:47 -05:00
yindo closed this issue 2026-02-21 17:51:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#2932