-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Improve st.cache error handling for Unhashable Types #1251
Copy link
Copy link
Closed
Labels
feature:cacheRelated to `st.cache_data` and `st.cache_resource`Related to `st.cache_data` and `st.cache_resource`type:bugSomething isn't working as expectedSomething isn't working as expected
Description
We need to improve the error handling in the code snippet below.
try:
reduce_data = obj.__reduce__()
except BaseException as e:
raise UnhashableTypeError(e, obj)
Objects can define their own __getstate__ method which get called by __reduce__. Therefore a bug could occur in this __getstate__ call, the error for which should bubble up to the user.
Currently we're suppressing this error message and type.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature:cacheRelated to `st.cache_data` and `st.cache_resource`Related to `st.cache_data` and `st.cache_resource`type:bugSomething isn't working as expectedSomething isn't working as expected