-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: StreamlitDuplicateElementId Error when Plotting with Plotly #382
Comments
Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊 You can also check our CONTRIBUTING.md for guidelines on contributing to this project. |
Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible. |
I would like to work on this issue, kindly please assign it to me. |
Issue #382 fixed StreamlitDuplicateElementId
Is there an existing issue for this?
What happened?
When rendering a Plotly chart using st.plotly_chart(fig), the app encounters the following error:
StreamlitDuplicateElementId: This app has encountered an error...
Add ScreenShots
Traceback:
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
result = func()
^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec
exec(code, module.dict)
File "/mount/src/stackoverflow-analysis/streamlit/home.py", line 139, in
main.main_analysis_2(df2018)
File "/mount/src/stackoverflow-analysis/streamlit/main_analysis.py", line 265, in main_analysis_2
ff.plot_bar_plotly(ds, "Country")
File "/mount/src/stackoverflow-analysis/streamlit/functions.py", line 49, in plot_bar_plotly
return st.plotly_chart(fig)
^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/metrics_util.py", line 410, in wrapped_func
result = non_optional_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/elements/plotly_chart.py", line 506, in plotly_chart
plotly_chart_proto.id = compute_and_register_element_id(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/elements/lib/utils.py", line 226, in compute_and_register_element_id
_register_element_id(ctx, element_type, element_id)
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/elements/lib/utils.py", line 132, in _register_element_id
raise StreamlitDuplicateElementId(element_type)
What browsers are you seeing the problem on?
Firefox, Chrome
Record
The text was updated successfully, but these errors were encountered: