dify - 💡(How to fix) Fix request trial-apps raise 500

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

2026-05-12 02:57:48,9 ERROR [app.py:875] 6616bb21a6 Exception on /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows [GET] Traceback (most recent call last): File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper resp = resource(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request resp = meth(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/controllers/console/app/wraps.py", line 138, in decorated_view return view_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 266, in wrapper return marshal( ^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 187, in _marshal out = OrderedDict(items) if ordered else dict(items) ^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 177, in <genexpr> else __format_field(k, v) ^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 170, in __format_field value = field.output(key, data, ordered=ordered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/fields.py", line 276, in output return marshal(value, self.nested, skip_none=self.skip_none, ordered=ordered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 179, in _marshal for k, v in fields.items() ^^^^^^^^^^^^ AttributeError: 'SchemaModel' object has no attribute 'items' 2026-05-12 02:57:48,18 INFO [handler.py:242] 6616bb21a6 127.0.0.1 - - [2026-05-12 02:57:48] "GET /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows HTTP/1.1" 500 406 0.022386 2026-05-12 02:57:49,40 ERROR [app.py:875] 8dd3df5db2 Exception on /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows [GET] Traceback (most recent call last): File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper resp = resource(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request resp = meth(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/controllers/console/app/wraps.py", line 138, in decorated_view return view_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 266, in wrapper return marshal( ^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 187, in _marshal out = OrderedDict(items) if ordered else dict(items) ^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 177, in <genexpr> else __format_field(k, v) ^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 170, in __format_field value = field.output(key, data, ordered=ordered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/fields.py", line 276, in output return marshal(value, self.nested, skip_none=self.skip_none, ordered=ordered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 179, in _marshal for k, v in fields.items() ^^^^^^^^^^^^ AttributeError: 'SchemaModel' object has no attribute 'items'

Fix Action

Fix / Workaround

exception:

2026-05-12 02:57:48,9 ERROR [app.py:875] 6616bb21a6 Exception on /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows [GET]
Traceback (most recent call last):
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/controllers/console/app/wraps.py", line 138, in decorated_view
    return view_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 266, in wrapper
    return marshal(
           ^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 187, in _marshal
    out = OrderedDict(items) if ordered else dict(items)
                                             ^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 177, in <genexpr>
    else __format_field(k, v)
         ^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 170, in __format_field
    value = field.output(key, data, ordered=ordered)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/fields.py", line 276, in output
    return marshal(value, self.nested, skip_none=self.skip_none, ordered=ordered)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 179, in _marshal
    for k, v in fields.items()
                ^^^^^^^^^^^^
AttributeError: 'SchemaModel' object has no attribute 'items'
2026-05-12 02:57:48,18 INFO [handler.py:242] 6616bb21a6 127.0.0.1 - - [2026-05-12 02:57:48] "GET /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows HTTP/1.1" 500 406 0.022386
2026-05-12 02:57:49,40 ERROR [app.py:875] 8dd3df5db2 Exception on /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows [GET]
Traceback (most recent call last):
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/controllers/console/app/wraps.py", line 138, in decorated_view
    return view_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 266, in wrapper
    return marshal(
           ^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 187, in _marshal
    out = OrderedDict(items) if ordered else dict(items)
                                             ^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 177, in <genexpr>
    else __format_field(k, v)
         ^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 170, in __format_field
    value = field.output(key, data, ordered=ordered)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/fields.py", line 276, in output
    return marshal(value, self.nested, skip_none=self.skip_none, ordered=ordered)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 179, in _marshal
    for k, v in fields.items()
                ^^^^^^^^^^^^
AttributeError: 'SchemaModel' object has no attribute 'items'

Code Example

2026-05-12 02:57:48,9 ERROR [app.py:875] 6616bb21a6 Exception on /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows [GET]
Traceback (most recent call last):
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/controllers/console/app/wraps.py", line 138, in decorated_view
    return view_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 266, in wrapper
    return marshal(
           ^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 187, in _marshal
    out = OrderedDict(items) if ordered else dict(items)
                                             ^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 177, in <genexpr>
    else __format_field(k, v)
         ^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 170, in __format_field
    value = field.output(key, data, ordered=ordered)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/fields.py", line 276, in output
    return marshal(value, self.nested, skip_none=self.skip_none, ordered=ordered)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 179, in _marshal
    for k, v in fields.items()
                ^^^^^^^^^^^^
AttributeError: 'SchemaModel' object has no attribute 'items'
2026-05-12 02:57:48,18 INFO [handler.py:242] 6616bb21a6 127.0.0.1 - - [2026-05-12 02:57:48] "GET /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows HTTP/1.1" 500 406 0.022386
2026-05-12 02:57:49,40 ERROR [app.py:875] 8dd3df5db2 Exception on /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows [GET]
Traceback (most recent call last):
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/controllers/console/app/wraps.py", line 138, in decorated_view
    return view_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 266, in wrapper
    return marshal(
           ^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 187, in _marshal
    out = OrderedDict(items) if ordered else dict(items)
                                             ^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 177, in <genexpr>
    else __format_field(k, v)
         ^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 170, in __format_field
    value = field.output(key, data, ordered=ordered)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/fields.py", line 276, in output
    return marshal(value, self.nested, skip_none=self.skip_none, ordered=ordered)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 179, in _marshal
    for k, v in fields.items()
                ^^^^^^^^^^^^
AttributeError: 'SchemaModel' object has no attribute 'items'
RAW_BUFFERClick to expand / collapse

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

newest main branch

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

request URL: https://console-staging.dify.dev/console/api/trial-apps/4179fed1-622e-4e29-b5c4-25c2f3c333f0/workflows

exception:

2026-05-12 02:57:48,9 ERROR [app.py:875] 6616bb21a6 Exception on /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows [GET]
Traceback (most recent call last):
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/controllers/console/app/wraps.py", line 138, in decorated_view
    return view_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 266, in wrapper
    return marshal(
           ^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 187, in _marshal
    out = OrderedDict(items) if ordered else dict(items)
                                             ^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 177, in <genexpr>
    else __format_field(k, v)
         ^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 170, in __format_field
    value = field.output(key, data, ordered=ordered)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/fields.py", line 276, in output
    return marshal(value, self.nested, skip_none=self.skip_none, ordered=ordered)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 179, in _marshal
    for k, v in fields.items()
                ^^^^^^^^^^^^
AttributeError: 'SchemaModel' object has no attribute 'items'
2026-05-12 02:57:48,18 INFO [handler.py:242] 6616bb21a6 127.0.0.1 - - [2026-05-12 02:57:48] "GET /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows HTTP/1.1" 500 406 0.022386
2026-05-12 02:57:49,40 ERROR [app.py:875] 8dd3df5db2 Exception on /console/api/trial-apps/f43655a6-b3c8-49f6-965d-78151f503ac9/workflows [GET]
Traceback (most recent call last):
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/controllers/console/app/wraps.py", line 138, in decorated_view
    return view_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 266, in wrapper
    return marshal(
           ^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 187, in _marshal
    out = OrderedDict(items) if ordered else dict(items)
                                             ^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 177, in <genexpr>
    else __format_field(k, v)
         ^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 170, in __format_field
    value = field.output(key, data, ordered=ordered)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/fields.py", line 276, in output
    return marshal(value, self.nested, skip_none=self.skip_none, ordered=ordered)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 54, in marshal
    out, has_wildcards = _marshal(data, fields, envelope, skip_none, mask, ordered)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hejl/projects/dify/api/.venv/lib/python3.12/site-packages/flask_restx/marshalling.py", line 179, in _marshal
    for k, v in fields.items()
                ^^^^^^^^^^^^
AttributeError: 'SchemaModel' object has no attribute 'items'

✔️ Expected Behavior

not raise exception

❌ Actual Behavior

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

dify - 💡(How to fix) Fix request trial-apps raise 500