-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Need hash_func for type _asyncio.Task #1253
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`feature:cache-hash-funcRelated to cache hashing functionsRelated to cache hashing functionstype:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features
Description
Summary
A community member noticed a "cannot hash of type" issue. More information can be found in this forum discussion.
Full error message
This is the error the community member received:
UnhashableType: Cannot hash object of type _asyncio.Task
While caching some code, Streamlit encountered an object of type _asyncio.Task.
You’ll need to help Streamlit understand how to hash that type with the hash_funcs argument. For example:
@st.cache(hash_funcs={_asyncio.Task: my_hash_func})
def my_func(...):
...
Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.
If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.
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`feature:cache-hash-funcRelated to cache hashing functionsRelated to cache hashing functionstype:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features