streamlit-elements icon indicating copy to clipboard operation
streamlit-elements copied to clipboard

Add AttributeError to ElementsCallbackData.__getattr__

Open sindrelothe opened this issue 3 years ago • 0 comments

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

sindrelothe avatar Jul 18 '22 10:07 sindrelothe