Exception in thread ScriptRunner.scriptThread:
Traceback (most recent call last):
File “C:\Anaconda3\lib\threading.py”, line 973, in _bootstrap_inner
self.run()
File “C:\Anaconda3\lib\threading.py”, line 910, in run
self._target(*self._args, **self._kwargs)
File “C:\Anaconda3\lib\site-packages\streamlit\scriptrunner\script_runner.py”, line 289, in _run_script_thread
widget_states = self._session_state.get_widget_states()
File “C:\Anaconda3\lib\site-packages\streamlit\state\safe_session_state.py”, line 82, in get_widget_states
return self.state.get_widget_states()
File “C:\Anaconda3\lib\site-packages\streamlit\state\session_state.py”, line 576, in get_widget_states
return self.new_widget_state.as_widget_states()
File “C:\Anaconda3\lib\site-packages\streamlit\state\session_state.py”, line 249, in as_widget_states
states = [
File “C:\Anaconda3\lib\site-packages\streamlit\state\session_state.py”, line 252, in
if self.get_serialized(widget_id)
File “C:\Anaconda3\lib\site-packages\streamlit\state\session_state.py”, line 230, in get_serialized
serialized = metadata.serializer(item.value)
File “C:\Anaconda3\lib\site-packages\streamlit\elements\radio.py”, line 166, in serialize_radio
return index(options, v)
File “C:\Anaconda3\lib\site-packages\streamlit\util.py”, line 129, in index
raise ValueError(“{} is not in iterable”.format(str(x)))
ValueError: dog is not in iterable
I would start by including the following line before you define the dataframe:
st.write(st.__version__)
As a sanity check, that will display the version of the Streamlit your app is running on. I suspect you have multiple conda environments with different versions of Streamlit. The environment with which you run streamlit run might not be the same one when you check your Streamlit version.
Please disregard my reply about Streamlit versions. I now understand your issue: while you’re able to select the options via radio buttons, the ValueError: dog is not in iterable appears in your terminal. This occurs even though the frontend does not raise any errors!
I believe you’ve discovered a bug . You can report the bug by creating a new issue in our GitHub repo and our engineers will work on a fix. Thank you for brining this to our attention! I’ve filed an internal bug report.