UnicodeDecodeError trying to deploy from github

Hey guys. Can I get some help with this error. I’m trying to run a simple python script that checks an RSS feed and extracts some information. It works fine on my computer, but I’m getting this error when trying to deploy.

UnicodeDecodeError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).

File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
    exec(code, module.__dict__)
File "/mount/src/tdb/main.py", line 67, in <module>
posted_eps = f.read().splitlines()   
File "/usr/local/lib/python3.9/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)

FWIW the line posted_eps = f.read().splitlines() is trying to access a text file next to the python scrip to retrieve some data. Btw, All the files are in the same folder on github.

Hi @Chil,

Thanks for sharing your question with the community! :balloon: Please update your debugging post to include a code snippet and a link to your app’s public GitHub repo – this will allow the community to help you find an answer as quickly as possible. In the meantime, this post will be tagged as needs-more-info.

Make sure the file is UTF8-encoded or specify the appropriate encoding when opening it.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.