[BUG] `set_props` streaming

Đang mở
#4,127 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@BSd3v đang làm issue này rồi.

Từ ngày 6/11/2026.

  • #4129 của @BSd3v — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
flask, python, react

Hướng nghiên cứu

Start by reproducing the issue with the example app in the report and trace how streaming callbacks deliver set_props updates to the client. Check the related open pull request #4129 for the current investigation. Done means the first set_props update reaches the client before the callback yields, with regression coverage for the reported sequence.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug P3 size: 1

In Dash 4.5.0:

A streaming callback does not send set_props to the client until the next yield.

Below is an example app:

from dash import LocalSharedStorage, Dash, html, dcc, Input, Output, callback, set_props, no_update
import asyncio

app = Dash(__name__,
           shared_storage=LocalSharedStorage())

app.layout = html.Div([
    html.Button(id='input', type='button', children='Click Me'),
    html.Div(id='output')
])

@callback(
    Output('output', 'id'),
    Input('input', 'n_clicks'),
    prevent_initial_call=True
)
async def update_output(value):
    set_props('output', {'children': html.Div(id='output2', children='Loading...')})
    # yield no_update
    await asyncio.sleep(1)
    set_props('output2', {'children': f'You entered: {value}'})
    yield no_update

if __name__ == '__main__':
    app.run(debug=True)
Ngôn ngữ chính
Python
Star
24.5k
Fork
2.3k
Merge trung bình
3 ngày 7 giờ
Pull request đã merge (30 ngày)
30

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của plotly/dash

Tất cả issue của plotly/dash

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.