gradio
356db5c2 - Fix DuplicateBlockError in multi-page apps with gr.render during reload (#13013)

Commit
51 days ago
Fix DuplicateBlockError in multi-page apps with gr.render during reload (#13013) * fix: prevent DuplicateBlockError in multi-page apps during reload When running multi-page apps with `gradio app.py` (reload mode), the watchfn resets Context.id to 0 before re-executing the module. However, child page modules already imported retain their original block IDs. This causes dynamically created blocks (via gr.render) to receive IDs that collide with existing blocks, raising DuplicateBlockError on the first page load. Fix by ensuring Context.id is set past all existing block IDs after the initial module re-execution in watchfn. Fixes gradio-app/gradio#12078 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * add changeset --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Hannah <hannahblair@users.noreply.github.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Author
Parents
Loading