Open vjf opened 4 days ago
To better figure out what’s causing this issue, could you share more details about the scenario where this happens?
I suspect the issue might be caused by the clear_map_layers method, which removes layers from the map’s _children attribute. If this happens while the map is being rendered, it could trigger the error. I can make a fix to avoid modifying _children during iteration, but since I don’t know the exact scenario, I’m not sure it’ll fully resolve the issue.
2024-11-18 12:20:08.392 Uncaught app exception Traceback (most recent call last): File "/home/faz014/seed-vault/.venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() File "/home/faz014/seed-vault/.venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec exec(code, module.dict) File "/home/faz014/seed-vault/seedvault/ui/1🌎_main.py", line 50, in
combined_based_workflow.render()
File "/home/faz014/seed-vault/seed_vault/ui/components/workflows_combined.py", line 264, in render
self.render_stage_2()
File "/home/faz014/seed-vault/seed_vault/ui/components/workflows_combined.py", line 229, in render_stage_2
self.station_components.render()
File "/home/faz014/seed-vault/seed_vault/ui/components/base.py", line 993, in render
self.render_map()
File "/home/faz014/seed-vault/seed_vault/ui/components/base.py", line 822, in render_map
self.map_output = st_folium(
File "/home/faz014/seed-vault/.venv/lib/python3.10/site-packages/streamlit_folium/init.py", line 284, in st_folium
folium_map.render()
File "/home/faz014/seed-vault/.venv/lib/python3.10/site-packages/folium/folium.py", line 403, in render
super().render(kwargs)
File "/home/faz014/seed-vault/.venv/lib/python3.10/site-packages/folium/elements.py", line 25, in render
super().render(kwargs)
File "/home/faz014/seed-vault/.venv/lib/python3.10/site-packages/branca/element.py", line 735, in render
for name, element in self._children.items():
RuntimeError: OrderedDict mutated during iteration