Skip to content
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

Allow to pass key to an agraph #53

Open
mojzis opened this issue Apr 10, 2024 · 1 comment
Open

Allow to pass key to an agraph #53

mojzis opened this issue Apr 10, 2024 · 1 comment

Comments

@mojzis
Copy link

mojzis commented Apr 10, 2024

when I create 2 agraphs on a page, streamlit complains:

streamlit.errors.DuplicateWidgetID: There are multiple identical `st.streamlit_agraph.agraph` widgets with the
same generated key.

When a widget is created, it's assigned an internal key based on
its structure. Multiple widgets with an identical structure will
result in the same internal key, which causes this error.

To fix this error, please pass a unique `key` argument to
`st.streamlit_agraph.agraph`.

but trying to do so ends up in an Uncaught app exception - TypeError: agraph() got an unexpected keyword argument 'key'

can we please allow agraph to accept the key argument ? does it make sense to have 2 agraphs on a page ?

@ChrisDelClea
Copy link
Owner

This is currently not a supported feature. However, if you find a way to pass a key, feel free to make a pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants