This is a new error in one of the latest versions of streamlit. If I remove @st.cache_data on the method it goes away. The error comes on my
st.plotly_chart(fig, use_container_width=True) calls. Its being thrown by the streamlit library.
AttributeError
Traceback:
File “/usr/local/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 600, in _run_script
exec(code, module.dict )
File “/cl-dashboard-internal/pages/27_Engagement_Improvement.py”, line 60, in
uic.funnel_change_by_language_chart(
File “/usr/local/lib/python3.12/site-packages/streamlit/runtime/caching/cache_utils.py”, line 165, in wrapper
return cached_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/streamlit/runtime/caching/cache_utils.py”, line 196, in call
return self._get_or_create_cached_value(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/streamlit/runtime/caching/cache_utils.py”, line 221, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/streamlit/runtime/caching/cache_utils.py”, line 277, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/cl-dashboard-internal/ui_components.py”, line 682, in funnel_change_by_language_chart
st.plotly_chart(fig, use_container_width=True)
File “/usr/local/lib/python3.12/site-packages/streamlit/runtime/metrics_util.py”, line 397, in wrapped_func
result = non_optional_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/streamlit/elements/plotly_chart.py”, line 527, in plotly_chart
return self.dg._enqueue(“plotly_chart”, plotly_chart_proto)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/streamlit/delta_generator.py”, line 486, in _enqueue
caching.save_element_message(
File “/usr/local/lib/python3.12/site-packages/streamlit/runtime/caching/init .py”, line 47, in save_element_message
CACHE_DATA_MESSAGE_REPLAY_CTX.save_element_message(
File “/usr/local/lib/python3.12/site-packages/streamlit/runtime/caching/cached_message_replay.py”, line 314, in save_element_message
raise AttributeError