Error when deleting assets
agross opened this issue · comments
Alexander Groß commented
<Response [204]>
2024-03-22 09:54:58.023 Uncaught app exception
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script
exec(code, module.__dict__)
File "/Users/agross/Downloads/immich_duplicate_finder/app.py", line 328, in <module>
main()
File "/Users/agross/Downloads/immich_duplicate_finder/app.py", line 318, in main
show_duplicate_photos(assets,limit)
File "/Users/agross/Downloads/immich_duplicate_finder/app.py", line 255, in show_duplicate_photos
if st.button(f"Delete {i}", key=f"delete-org-{i}"):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/metrics_util.py", line 397, in wrapped_func
result = non_optional_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/elements/widgets/button.py", line 163, in button
return self.dg._button(
^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/elements/widgets/button.py", line 753, in _button
button_state = register_widget(
^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/state/widgets.py", line 163, in register_widget
return register_widget_from_metadata(metadata, ctx, widget_func_name, element_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/state/widgets.py", line 196, in register_widget_from_metadata
raise DuplicateWidgetID(
streamlit.errors.DuplicateWidgetID: There are multiple widgets with the same `key='delete-org-1'`.
To fix this, please make sure that the `key` argument is unique for each
widget you create.
Thess commented
Just uploaded the revised version. Let me know
Alexander Groß commented
It's working now, thank you!