GatorEducator/GatorMiner

UnhashableTypeError caused by streamlit version 0.79.0

Closed this issue · 1 comments

Describe the bug
UnhashableTypeError: Cannot hash object of type preshed.maps.PreshMap, found in the body of import_data().

Screenshots

UnhashableTypeError: Cannot hash object of type preshed.maps.PreshMap, found in the body of import_data().
While caching the body of import_data(), Streamlit encountered an object of type preshed.maps.PreshMap, which it does not know how to hash.
To address this, please try helping Streamlit understand how to hash that type by passing the hash_funcs argument into @st.cache. For example:
@st.cache(hash_funcs={preshed.maps.PreshMap: my_hash_func})
def my_func(...):
    ...
If you don't know where the object of type preshed.maps.PreshMap is coming from, try looking at the hash chain below for an object that you do recognize, then pass that to hash_funcs instead:

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Browser Chrome

Additional context
Quick fix: changing streamlit version to ~=0.78.0 in the Pipfile

@ahance27 Thanks again for raising the issue and provide a quick fix solution. Streamlit has just made the release of 0.79.0 five days ago, and it is related to the cache functionalities.

Now that there are some Linux users also reported the UnhashableTypeError caused by 0.79.0. I think it might be a good idea to just make a PR and specify the version in the Pipfile, and Pipfile.lock, in the master, until we can be sure that 0.79.0 will work across all platforms.