Skip to content

StreamlitDuplicateElementId #79

@serwarde

Description

@serwarde

Describe the bug
A clear and concise description of what the bug is.
If the same project gets processed multiples time, Streamlit throws a StreamlitDuplicateElementId error, because the resulting plots have the same parameters which results in them having the same ID.

To Reproduce
Steps to reproduce the behavior:

  1. Import the same project multiple times
  2. Get the aforementioned error.

Expected behavior
The same project shouldn't be processed twice. Alternatively, assign a randomly generated ID to the plots to avoid duplicates.

Error message

StreamlitDuplicateElementId: There are multiple plotly_chart elements with the same auto-generated ID. When this element is created, it is assigned an internal ID based on the element type and provided parameters. Multiple elements with the same type and parameters will cause this error.
To fix this error, please pass a unique key argument to the plotly_chart element.
Traceback:
File "/usr/local/lib/python3.11/dist-packages/inception_reports/generate_reports_manager.py", line 766, in
main()File "/usr/local/lib/python3.11/dist-packages/inception_reports/generate_reports_manager.py", line 762, in main
plot_project_progress(project)File "/usr/local/lib/python3.11/dist-packages/inception_reports/generate_reports_manager.py", line 738, in plot_project_progress
st.plotly_chart(pie_chart, use_container_width=True)

Metadata

Metadata

Assignees

Labels

🐛BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions