IndexError: Read less bytes than requested

Hello Team,

When the app is trying to load the weights of my trained model from my Github repo, app is throwing below error.

IndexError: Read less bytes than requested


** **File "/home/appuser/.local/lib/python3.7/site-packages/streamlit/", line 332, in _run_script** ** exec(code, module.__dict__)File "/app/road_damage_detection_streamlit/", line 419, in <module>** ** main()File "/app/road_damage_detection_streamlit/", line 57, in main** ** run_the_app()File "/app/road_damage_detection_streamlit/", line 93, in run_the_app** ** yolo.load_weights(weights).expect_partial()File "/home/appuser/.local/lib/python3.7/site-packages/tensorflow/python/keras/engine/", line 2205, in load_weights** ** status = self._trackable_saver.restore(filepath, options)File "/home/appuser/.local/lib/python3.7/site-packages/tensorflow/python/training/tracking/", line 1299, in restore** ** object_graph_string = reader.get_tensor(base.OBJECT_GRAPH_PROTO_KEY)File "/home/appuser/.local/lib/python3.7/site-packages/tensorflow/python/training/", line 70, in get_tensor** ** self, compat.as_bytes(tensor_str))** **

Note: I already deployed this streamlit app without any issues on GCP and it was also running fine as expected and also it is to be noted that I pushed the weights into my GITHUB Repo using GITHUB LFS because weights size is around 395 MB.

Hi @jugaloza, welcome to the Streamlit community!

Git LFS is not currently supported on Streamlit sharing. This is why your app works via GCP, but not on Streamlit sharing.

In speaking with our engineering team, it is expected to be added at the end of January / early February.


Hi @randyzwitch thank you for the quick update, please notify me when its added.

1 Like