-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@st.cache_data
cannot handle UUID objects (but @st.cache
can)
#6440
Labels
priority:P2
status:confirmed
Bug has been confirmed by the Streamlit team
type:bug
Something isn't working
Comments
timothygebhard
added
status:needs-triage
Has not been triaged by the Streamlit team
type:bug
Something isn't working
labels
Apr 6, 2023
kajarenc
added a commit
that referenced
this issue
Apr 8, 2023
9 tasks
vdonato
added
status:confirmed
Bug has been confirmed by the Streamlit team
priority:P2
and removed
status:needs-triage
Has not been triaged by the Streamlit team
labels
Apr 11, 2023
kajarenc
added a commit
that referenced
this issue
Apr 11, 2023
* Fix #6440 Add uuid to types we natively hash UUID is a built-in Python type (lives in the standard library). This PR adds support for uuid hashing, so it would be possible to use uuid objects as parameters for functions decorated with @st.cache_data
eric-skydio
pushed a commit
to eric-skydio/streamlit
that referenced
this issue
Dec 20, 2023
* Fix streamlit#6440 Add uuid to types we natively hash UUID is a built-in Python type (lives in the standard library). This PR adds support for uuid hashing, so it would be possible to use uuid objects as parameters for functions decorated with @st.cache_data
zyxue
pushed a commit
to zyxue/streamlit
that referenced
this issue
Mar 22, 2024
* Fix streamlit#6440 Add uuid to types we natively hash UUID is a built-in Python type (lives in the standard library). This PR adds support for uuid hashing, so it would be possible to use uuid objects as parameters for functions decorated with @st.cache_data
zyxue
pushed a commit
to zyxue/streamlit
that referenced
this issue
Apr 16, 2024
* Fix streamlit#6440 Add uuid to types we natively hash UUID is a built-in Python type (lives in the standard library). This PR adds support for uuid hashing, so it would be possible to use uuid objects as parameters for functions decorated with @st.cache_data
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
priority:P2
status:confirmed
Bug has been confirmed by the Streamlit team
type:bug
Something isn't working
Checklist
Summary
It looks like the "new"
@st.cache_data
decorator chokes onuuid.UUID
objects, while the deprecated@st.cache
seems to handle them just fine; see minimal example.Reproducible Code Example
Steps To Reproduce
No response
Expected Behavior
No response
Current Behavior
The minimal example above produces the following output:
Is this a regression?
Debug info
Additional Information
The root of the problems seems to be this:
Which is a little strange because pickling and hashing
UUID
objects does not seem to be a problem in general:A simple workaround for now is to cast
UUID
objects to strings (which are cacheable also with@st.cache_data
), but of course it would be nicer if that were not necessary :)Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: