Error using upload button with release 0.88.0

Dear all,
When I use a code which was working well with version 0.85 to upload some file, I get the error:
AttributeError: ‘google.protobuf.pyext._message.RepeatedScalarConta’ object has no attribute ‘uploaded_file_info’
My code is essentially: uploaded_file = st.file_uploader(“Upload your data”, type= (“xlsx”,“csv”))

It seems to come from: file_uploader.py", line 243. Here is the full error message:

Traceback:
File “/opt/software/Miniconda/lib/python3.6/site-packages/streamlit/script_runner.py”, line 351, in _run_script
self._session_state.call_callbacks()
File “/opt/software/Miniconda/lib/python3.6/site-packages/streamlit/state/session_state.py”, line 399, in call_callbacks
wid for wid in self._new_widget_state if self._widget_changed(wid)
File “/opt/software/Miniconda/lib/python3.6/site-packages/streamlit/state/session_state.py”, line 399, in
wid for wid in self._new_widget_state if self._widget_changed(wid)
File “/opt/software/Miniconda/lib/python3.6/site-packages/streamlit/state/session_state.py”, line 405, in _widget_changed
new_value = self._new_widget_state.get(widget_id)
File “/opt/software/Miniconda/lib/python3.6/_collections_abc.py”, line 660, in get
return self[key]
File “/opt/software/Miniconda/lib/python3.6/site-packages/streamlit/state/session_state.py”, line 120, in getitem
deserialized = metadata.deserializer(value, metadata.id)
File “/opt/software/Miniconda/lib/python3.6/site-packages/streamlit/elements/file_uploader.py”, line 166, in deserialize_file_uploader
file_recs = self._get_file_recs(widget_id, ui_value)
File “/opt/software/Miniconda/lib/python3.6/site-packages/streamlit/elements/file_uploader.py”, line 243, in _get_file_recs
uploaded_file_info = widget_value.uploaded_file_info

Thanks

1 Like

Hi @victorstorchan, and welcome to the Streamlit community! :balloon::raised_hands:

Would you mind posting your code please?

Thanks
Charly

Hello! thank you for your answer.
My code is really only:

@Charly_Wargnier I would just be curious if you can reproduce the error: the command works well with version 0.85 but crash with the 0.88 version. Thanks for the great help :slight_smile:

Please try with " instead of “?

What do you mean? I need both to use the new download button which is only available with the 0.88. version and the file_uploader which does not seem to work with this version.

Your code works fine for me, yet you’d need to change the quotation marks

Thanks,
Chary

1 Like