UnicodeDecodeError when loading logs with strange characters
Closed this issue · 5 comments
UnicodeDecodeError thrown when lasio attempts to load las with strange characters. Will attempt to email you the log that trips this error.
Not sure what the correct course of action would be. Perhaps laod_data()
func in app.py
can be modified. I think some manipulation with io.StringIO and windows-1252 decode in a try/except block might strengthen the function.
Thanks Matt.
Do you have more info on the manipulation with io.StringIO? I could add a simple try/except block to catch any errors like that. I wonder if this is a Streamlit issue - the trace seems to suggest it may be.
Are you able to share the file you are using to get this error?
Hey Andy,
Just forked las_explorer, sitting down to hammer out the issue. Will send changes in a pull request. This is a streamlit issue, I have ran into it before.
Here is link to logs: https://drive.google.com/drive/folders/1gVIjBU5HsOwDD114bX54Zxb8vLnZLPsM?usp=sharing
If it is a Streamlit issue, I can raise it on their community forum. They have been pretty good at responding to me on other issues. Would you be ok if they had access to the LAS file in question?
Yeah, if you don't mind. No worries with the logs. There is only a small snippet of info for handling situations like this in the API documentation (under file_uploader).
I have raised the question on the Streamlit community forum:
https://discuss.streamlit.io/t/file-uploader-utf-8-codec-with-las-files/8789