streamlit-elements
streamlit-elements copied to clipboard
Add AttributeError to ElementsCallbackData.__getattr__
From here: https://docs.python.org/3/reference/datamodel.html?highlight=getattr#object.__getattr
object.getattr(self, name) This method should either return the (computed) attribute value or raise an AttributeError
Right now the function throws a KeyError when it gets a wrong argument, which makes the streamit_elements components unusable with pickle, deepcopy and other standard python libraries because they expect ArgumentError