dify - 💡(How to fix) Fix Delete logs older than X days Error [1 participants]

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…
GitHub stats
langgenius/dify#36120Fetched 2026-05-14 03:46:37
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
1
Author
Participants
Assignees
Timeline (top)
labeled ×2assigned ×1

Error Message

Failed to process tenant [my tenant id] Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/graphon/model_runtime/utils/encoders.py", line 253, in _coerce_mapping_like return dict(obj) ^^^^^^^^^ TypeError: 'classmethod_descriptor' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/graphon/model_runtime/utils/encoders.py", line 257, in _coerce_mapping_like return vars(obj) ^^^^^^^^^ TypeError: vars() argument must have dict attribute

The above exception was the direct cause of the following exception:

Code Example

docker exec -it docker-api-1 flask clear-free-plan-tenant-expired-logs \
  --days 30 \
  --batch 100 \
  --tenant_ids [my tenant id]

---

Failed to process tenant [my tenant id]
Traceback (most recent call last):
  File "/app/api/.venv/lib/python3.12/site-packages/graphon/model_runtime/utils/encoders.py", line 253, in _coerce_mapping_like
    return dict(obj)
           ^^^^^^^^^
TypeError: 'classmethod_descriptor' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/api/.venv/lib/python3.12/site-packages/graphon/model_runtime/utils/encoders.py", line 257, in _coerce_mapping_like
    return vars(obj)
           ^^^^^^^^^
TypeError: vars() argument must have __dict__ attribute

The above exception was the direct cause of the following exception:
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

1.14.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I read the documentation at https://docs.dify.ai/en/self-host/troubleshooting/storage-and-migration#data-cleanup and want to delete the logs. When I execute it,

docker exec -it docker-api-1 flask clear-free-plan-tenant-expired-logs \
  --days 30 \
  --batch 100 \
  --tenant_ids [my tenant id]

I get an error.

Failed to process tenant [my tenant id]
Traceback (most recent call last):
  File "/app/api/.venv/lib/python3.12/site-packages/graphon/model_runtime/utils/encoders.py", line 253, in _coerce_mapping_like
    return dict(obj)
           ^^^^^^^^^
TypeError: 'classmethod_descriptor' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/api/.venv/lib/python3.12/site-packages/graphon/model_runtime/utils/encoders.py", line 257, in _coerce_mapping_like
    return vars(obj)
           ^^^^^^^^^
TypeError: vars() argument must have __dict__ attribute

The above exception was the direct cause of the following exception:

✔️ Expected Behavior

Successfully deleted the old logs

❌ 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 Delete logs older than X days Error [1 participants]