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

Traceback:

** **File "/home/appuser/.local/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script** ** exec(code, module.__dict__)File "/app/road_damage_detection_streamlit/app.py", line 419, in <module>** ** main()File "/app/road_damage_detection_streamlit/app.py", line 57, in main** ** run_the_app()File "/app/road_damage_detection_streamlit/app.py", 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/training.py", 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/util.py", 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/py_checkpoint_reader.py", 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.

Best,
Randy

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

1 Like

Hi @randyzwitch Greetings, do you have any update when GIT LFS will be available, as you have informed that this will be added by end of January/ early february.

Hi @jugaloza -

If I’m not mistaken, Git LFS should go out in our next release (we do weekly releases on Streamlit sharing). So I’m pretty sure it’s coming out this week (West Coast of the U.S. still not in the office, so haven’t confirmed yet).

Best,
Randy

Hi @randyzwitch,

Thank you for the reply, please let me know once it is released.

Thanks,

@randyzwitch seems git lfs update has not been released yet.

@Yodeman Is there any specific date when this update will be released??.

@jugaloza I’m having same issue … I don’t know when the update will be out. Let’s hope it’d be available by next week.

Not sure what everyone is expecting here…3 days ago (Monday), the expectation was “this week”. It’s still this week for two more business days, and the West Coast of the United States hasn’t even woken up, let alone arrived at work.

We try our best to give out accurate dates, but if it’s going to become a problem where the demands are ever increasing, then we’ll have to reconsider what information we share with the community. Please be patient.

Best,
Randy

Thanks @randyzwitch

Git LFS should have gone out in the Streamlit sharing release this evening, please try it out and let us know if you have any issues.

Best,
Randy

It’s giving same error message…

thanks @randyzwitch

@randyzwitch Thank you and your team, its working now.

1 Like