Skip to content

UnhashableType: Cannot hash object of type _io.BytesIO #1

Description

@Ajinkz
@st.cache(hash_funcs={_io.BytesIO: my_hash_func})
def my_func(...):

Traceback:
  File "C:\Users\Infogen\Desktop\Learn\streamlit\WebApp-Computer-Vision-streamlit\main.py", line 53, in <module>
    main()
  File "C:\Users\Infogen\Desktop\Learn\streamlit\WebApp-Computer-Vision-streamlit\main.py", line 44, in main
    imageWebApp(guiParam)
  File "C:\Users\Infogen\Desktop\Learn\streamlit\WebApp-Computer-Vision-streamlit\main.py", line 23, in imageWebApp
    image = conf.load_image_or_video()
  File "C:\Users\Infogen\Desktop\Learn\streamlit\WebApp-Computer-Vision-streamlit\libraries\utils.py", line 415, in load_image_or_video
    self.data = self.load_image_source()
  File "C:\Users\Infogen\Desktop\Learn\streamlit\WebApp-Computer-Vision-streamlit\libraries\utils.py", line 369, in load_image_source
    self.image = load_image_from_upload(file_path)
  File "d:\programdata\anaconda3\envs\stream\lib\copyreg.py", line 66, in _reduce_ex
    raise TypeError(f"cannot pickle {cls.__name__!r} object")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions