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.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.