Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[BUG] Celery Background Callback Manager fails with Non-Key/Value-Backends

未关闭
#3,729 7 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@datenzauberai 已经在做这个了。

开始于 2026年4月8日。

评估

这个 Issue 还没有评估数据。

描述

bug P3 size: 5

Describe your context

This applies to background callbacks using the Celery Background Callback Manager. This should be reproducible using the latest version of dash as well.

dash                                     3.3.0
dash-ag-grid                             33.3.3
dash-iconify                             0.1.2
dash-mantine-components                  2.5.1
dash-testing-stub                        0.0.2

Describe the bug

Celery supports multiple backends that are not a BaseKeyValueStoreBackend:

  • CassandraBackend
  • DatabaseBackend
  • MongoBackend
  • RPCBackend

However, Dash's CeleryManager assumes the backend to be a BaseKeyValueStoreBackend having the methods set and get.

Configuring any of the backends above will result in an error similar to AttributeError: 'DatabaseBackend' object has no attribute 'get' when triggering a background callback.

Backends that that implement BaseKeyValueStoreBackend might also fail, when the parameters passed to set and get do not comply with the backend's requirements (e.g. the FilesystemBackend expects a byte-like object for the key resulting in an error similar to TypeError: sequence item 1: expected a bytes-like object, str found, also see https://github.com/plotly/dash/issues/3116).

Expected behavior

The CeleryManager should either

  • support all Celery backends by using get_result and store_result from BaseBackend instead of get and set and using byte-like objects for keys or
  • make the restriction more explicit by additional documentation and erroring early on when the configured backend does not implement BaseKeyValueStoreBackend or is otherwise not supported.

Especially the DatabaseBackend and FilesystemBackend would be accessible options without the need for additional infrastructure to execute background callbacks.

主要语言
Python
星标
24.4k
派生
2.3k
平均合并
1 天 21 小时
30 天内合并 PR
19

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

plotly/dash 的其他 Issue

查看 plotly/dash 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。