There is an issue with the JSON processing plugin #633

Closed
opened 2026-02-16 10:19:59 -05:00 by yindo · 1 comment
Owner

Originally created by @suxuanning on GitHub (Sep 9, 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 Dify issues & Dify Official Plugins, 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.18.0

Plugin version

0.0.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

The result should be empty, not the string 'None'

✔️ Error log

No response

Originally created by @suxuanning on GitHub (Sep 9, 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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.18.0 ### Plugin version 0.0.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce <img width="673" height="338" alt="Image" src="https://github.com/user-attachments/assets/7c47d599-bec9-4ef6-98de-a0c7d1a8057f" /> The result should be empty, not the string 'None' ### ✔️ Error log _No response_
yindo added the bug label 2026-02-16 10:19:59 -05:00
yindo closed this issue 2026-02-16 10:19:59 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 9, 2025):

The root cause is in the plugin's code: when the extraction result is None, it gets converted to the string 'None' instead of an empty value. This happens in the _extract method of JSONParseTool in tools/json_process/tools/parse.py, where str(result) is returned even if result is None. To fix this, update the code so that if result is None, it returns an empty string ("") or another appropriate empty value instead of str(result)—for example:

if result is None:
    return ""
else:
    return str(result)

This will prevent the plugin from returning 'None' as a string when the result is empty. You can see the relevant code and logic here.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Sep 9, 2025): <!-- Answer --> The root cause is in the plugin's code: when the extraction result is None, it gets converted to the string `'None'` instead of an empty value. This happens in the `_extract` method of `JSONParseTool` in `tools/json_process/tools/parse.py`, where `str(result)` is returned even if `result` is None. To fix this, update the code so that if `result is None`, it returns an empty string (`""`) or another appropriate empty value instead of `str(result)`—for example: ```python if result is None: return "" else: return str(result) ``` This will prevent the plugin from returning `'None'` as a string when the result is empty. You can see the relevant code and logic [here](https://github.com/langgenius/dify-official-plugins/blob/f2dbcfad79db89143e00655ea6a0b51fefc96da6/tools/json_process/tools/parse.py). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/7f91dda5-fbc6-4883-991a-fb12f70f16ae?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/7f91dda5-fbc6-4883-991a-fb12f70f16ae?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/7f91dda5-fbc6-4883-991a-fb12f70f16ae?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/7f91dda5-fbc6-4883-991a-fb12f70f16ae?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7f91dda5-fbc6-4883-991a-fb12f70f16ae?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/7f91dda5-fbc6-4883-991a-fb12f70f16ae?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7f91dda5-fbc6-4883-991a-fb12f70f16ae?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/1686)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#633