loop node error #19845

Closed
opened 2026-02-21 20:04:31 -05:00 by yindo · 2 comments
Owner

Originally created by @birdOS1 on GitHub (Oct 23, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.9.2

Cloud or Self Hosted

Self Hosted (Source), Self Hosted (Docker)

Steps to reproduce

Image Image Image

✔️ Expected Behavior

The workflow executes normally

Actual Behavior

[2025-10-23 05:58:42 +0000] [35] [ERROR] Error handling request
Traceback (most recent call last):
File "/app/api/.venv/lib/python3.12/site-packages/gunicorn/workers/base_async.py", line 114, in handle_request
for item in respiter:
^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/werkzeug/wsgi.py", line 256, in next
return self._next()
^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/werkzeug/wrappers/response.py", line 32, in _iter_encoded
for item in iterable:
^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/flask/helpers.py", line 132, in generator
yield from gen
File "/app/api/libs/helper.py", line 209, in generate
yield from response
File "/app/api/core/app/features/rate_limiting/rate_limit.py", line 120, in next
return next(self.generator)
^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/app/apps/base_app_generator.py", line 176, in gen
for message in generator:
^^^^^^^^^
File "/app/api/core/app/apps/base_app_generate_response_converter.py", line 27, in _generate_full_response
yield from cls.convert_stream_full_response(response)
File "/app/api/core/app/apps/workflow/generate_response_converter.py", line 46, in convert_stream_full_response
for chunk in stream_response:
^^^^^^^^^^^^^^^
File "/app/api/core/app/apps/workflow/generate_task_pipeline.py", line 167, in _to_stream_response
for stream_response in generator:
^^^^^^^^^
File "/app/api/core/app/apps/workflow/generate_task_pipeline.py", line 198, in _wrapper_process_stream_response
for response in self._process_stream_response(tts_publisher=tts_publisher, trace_manager=trace_manager):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/app/apps/workflow/generate_task_pipeline.py", line 619, in _process_stream_response
if responses := list(
^^^^^
File "/app/api/core/app/apps/workflow/generate_task_pipeline.py", line 546, in _dispatch_event
yield from handler(
File "/app/api/core/app/apps/workflow/generate_task_pipeline.py", line 298, in _handle_node_succeeded_event
node_success_response = self._workflow_response_converter.workflow_node_finish_to_stream_response(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/app/apps/common/workflow_response_converter.py", line 317, in workflow_node_finish_to_stream_response
process_data, process_data_truncated = self._truncate_mapping(event.process_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/app/apps/common/workflow_response_converter.py", line 167, in _truncate_mapping
truncated, is_truncated = self._truncator.truncate_variable_mapping(dict(normalized))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/services/variable_truncator.py", line 126, in truncate_variable_mapping
part_result = self._truncate_json_primitives(value, value_budget)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/services/variable_truncator.py", line 409, in _truncate_json_primitives
return self._truncate_array(val, target_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/services/variable_truncator.py", line 289, in _truncate_array
raise UnknownTypeError(f"got unknown type {type(item)} in array truncation")
services.variable_truncator.UnknownTypeError: got unknown type <class 'core.workflow.nodes.variable_assigner.common.helpers.UpdatedVariable'> in array truncation

Image
Originally created by @birdOS1 on GitHub (Oct 23, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.9.2 ### Cloud or Self Hosted Self Hosted (Source), Self Hosted (Docker) ### Steps to reproduce <img width="646" height="760" alt="Image" src="https://github.com/user-attachments/assets/dea346e6-04a6-42cf-974b-c5d06b14a142" /> <img width="2390" height="680" alt="Image" src="https://github.com/user-attachments/assets/32008883-2224-4eed-809e-551b1c275502" /> <img width="2148" height="674" alt="Image" src="https://github.com/user-attachments/assets/05310a77-f297-48e1-b12b-4f1eadb9afa0" /> ### ✔️ Expected Behavior The workflow executes normally ### ❌ Actual Behavior [2025-10-23 05:58:42 +0000] [35] [ERROR] Error handling request Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/gunicorn/workers/base_async.py", line 114, in handle_request for item in respiter: ^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/werkzeug/wsgi.py", line 256, in __next__ return self._next() ^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/werkzeug/wrappers/response.py", line 32, in _iter_encoded for item in iterable: ^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask/helpers.py", line 132, in generator yield from gen File "/app/api/libs/helper.py", line 209, in generate yield from response File "/app/api/core/app/features/rate_limiting/rate_limit.py", line 120, in __next__ return next(self.generator) ^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/app/apps/base_app_generator.py", line 176, in gen for message in generator: ^^^^^^^^^ File "/app/api/core/app/apps/base_app_generate_response_converter.py", line 27, in _generate_full_response yield from cls.convert_stream_full_response(response) File "/app/api/core/app/apps/workflow/generate_response_converter.py", line 46, in convert_stream_full_response for chunk in stream_response: ^^^^^^^^^^^^^^^ File "/app/api/core/app/apps/workflow/generate_task_pipeline.py", line 167, in _to_stream_response for stream_response in generator: ^^^^^^^^^ File "/app/api/core/app/apps/workflow/generate_task_pipeline.py", line 198, in _wrapper_process_stream_response for response in self._process_stream_response(tts_publisher=tts_publisher, trace_manager=trace_manager): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/app/apps/workflow/generate_task_pipeline.py", line 619, in _process_stream_response if responses := list( ^^^^^ File "/app/api/core/app/apps/workflow/generate_task_pipeline.py", line 546, in _dispatch_event yield from handler( File "/app/api/core/app/apps/workflow/generate_task_pipeline.py", line 298, in _handle_node_succeeded_event node_success_response = self._workflow_response_converter.workflow_node_finish_to_stream_response( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/app/apps/common/workflow_response_converter.py", line 317, in workflow_node_finish_to_stream_response process_data, process_data_truncated = self._truncate_mapping(event.process_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/app/apps/common/workflow_response_converter.py", line 167, in _truncate_mapping truncated, is_truncated = self._truncator.truncate_variable_mapping(dict(normalized)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/services/variable_truncator.py", line 126, in truncate_variable_mapping part_result = self._truncate_json_primitives(value, value_budget) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/services/variable_truncator.py", line 409, in _truncate_json_primitives return self._truncate_array(val, target_size) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/services/variable_truncator.py", line 289, in _truncate_array raise UnknownTypeError(f"got unknown type {type(item)} in array truncation") services.variable_truncator.UnknownTypeError: got unknown type <class 'core.workflow.nodes.variable_assigner.common.helpers.UpdatedVariable'> in array truncation <img width="2368" height="734" alt="Image" src="https://github.com/user-attachments/assets/9fb8a27b-3edf-4df0-b8fe-eb45af760b73" />
yindo added the 🐞 bug label 2026-02-21 20:04:31 -05:00
yindo closed this issue 2026-02-21 20:04:31 -05:00
Author
Owner

@birdOS1 commented on GitHub (Oct 23, 2025):

Image All nodes in the running record can be displayed normally
@birdOS1 commented on GitHub (Oct 23, 2025): <img width="800" height="890" alt="Image" src="https://github.com/user-attachments/assets/4569dde5-17de-440d-8a71-c8695c17ab13" /> All nodes in the running record can be displayed normally
Author
Owner

@dosubot[bot] commented on GitHub (Nov 23, 2025):

Hi, @birdOS1. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported an error in version 1.9.2 of self-hosted Dify when running a loop node workflow.
  • The error involves a traceback related to Gunicorn and Werkzeug request handling.
  • Expected behavior is normal workflow execution, but the error prevents this.
  • You provided screenshots and confirmed all nodes in the running record display normally.
  • No further updates or solutions have been posted since your initial report.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here.
  • If I don’t hear back within 15 days, I will automatically close this issue.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Nov 23, 2025): Hi, @birdOS1. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported an error in version 1.9.2 of self-hosted Dify when running a loop node workflow. - The error involves a traceback related to Gunicorn and Werkzeug request handling. - Expected behavior is normal workflow execution, but the error prevents this. - You provided screenshots and confirmed all nodes in the running record display normally. - No further updates or solutions have been posted since your initial report. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here. - If I don’t hear back within 15 days, I will automatically close this issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#19845