Skip to content

Need hash_func for type _asyncio.Task #1253

@tc87

Description

@tc87

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:cacheRelated to `st.cache_data` and `st.cache_resource`feature:cache-hash-funcRelated to cache hashing functionstype:enhancementRequests for feature enhancements or new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions