Hi there everyone!
I’m new to this forum, although I’ve been using Streamlit for 3 months or so. I’ve run into a problem that I don’t know how to solve. I’ve been working in a streamlit app that before yesterday worked just fine. Somehow, it doesn’t work anymore and I’m not conscious of having done anything that could alter its behaviour.
The error is this one:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
So I surfed on the internet reading why this happens and there are a lot of topics related to csv files and so on. I read separately each of the csv files and excel files that my app uses and the problem isn’t there.
Then I created a dumb app that consists in this two lines of code with the only purpose of executing a streamlit app to see if the error was there:
import streamlit as st st.write("Hi there!")
And the error that I got is exactly the same:
Traceback (most recent call last): File "C:/Users/alons/PycharmProjects/maps5/prueba2.py", line 3, in <module> st.write("Hi there!") File "C:\Users\anaconda3\envs\maps5\lib\site-packages\streamlit\elements\write.py", line 234, in write flush_buffer() File "C:\Users\anaconda3\envs\maps5\lib\site-packages\streamlit\elements\write.py", line 168, in flush_buffer self.dg.markdown( File "C:\Users\anaconda3\envs\maps5\lib\site-packages\streamlit\elements\markdown.py", line 79, in markdown return self.dg._enqueue("markdown", markdown_proto) File "C:\Users\anaconda3\envs\maps5\lib\site-packages\streamlit\delta_generator.py", line 376, in _enqueue st._maybe_print_use_warning() File "C:\Users\anaconda3\envs\maps5\lib\site-packages\streamlit\__init__.py", line 466, in _maybe_print_use_warning elif not _is_running_with_streamlit and _config.get_option( File "C:\Users\anaconda3\envs\maps5\lib\site-packages\streamlit\config.py", line 103, in get_option config_options = get_config_options() File "C:\Users\anaconda3\envs\maps5\lib\site-packages\streamlit\config.py", line 1096, in get_config_options file_contents = input.read() File "C:\Users\anaconda3\envs\maps5\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
If I run “Streamlit hello” on the terminal, once more I get the same error.
I don’t know why this happens, everything worked just fine until yesterday.
Streamlit version when I encountered this error: I think 1.4, then upgraded to 1.7 (didn’t work) then downgraded to 1.2 (didn’t work).
I’m using a conda environment and python version 3.9.0 in a Windows machine.
Thanks in advance!