Failed to download the sources for repository

Hi,

I have a similar issue, my app is running fine locally, but when I deploy it on share.streamlit.io an error occurs:

I deleted and re-deployed it several times, the result is always the same. Then, I tried @BenUze suggestion and created a new repo. It worked, the app deployed. But since my original repo has some stars and people following it, I don’t want to migrate to a new one.

So I experimented changing the branch name of my original repo from master to main, and, to my surprise, the app deployed successfully after that. Yesterday I even changed it back to master, and the app deployed again. However, today the app crashed, showing the same error, and without me pushing any new commit.

@snehankekre and @Alex_Toader do you know what could be the issue?

Here is my streamlit app:
https://gabrieltempass-ab-tester-streamlit-app-skt08e.streamlitapp.com/

Switching from conda to pipenv solved the issue. Streamlit seems to have a bug, sometimes, when installing dependencies with conda, as this other post from July 8th also shows: Failing to build a Streamlit Cloud app - #5 by drorata

1 Like

Hi. I’m running into the same issue - “Failed to download the sources for repository”. I’ve also tried deleting and rebooting my app but still no luck. Any suggestions?

Hello, I’m facing the same issue. Streamlit adds an SSH key which is read-only. Is this why it does not have write access? Here is the screenshot


Please help me resolve this issue.

Hi,

@Hemanth_Sai , deleting and redeploying the application should recreate the SSH Key, but this could be caused by something else.
@chwubryan @Hemanth_Sai could you share links to your applications?

Streamlit deploy link: https://hemanthsai7-intelligent-question-generator-app-rtvogi.streamlitapp.com/
@Alex_Toader

Tried those steps too, but still faced the same issue. Sorry, I’m not able to write more than 3 messages so edited this one. @Alex_Toader

You are right, something is not working as expected. The git logs do not provide any insight into why the failure is happening. Would you be up for trying a few steps to try to rule out some potential issues?
Can you:

  1. Delete the application
  2. Manually delete the SSH keys from GitHub
  3. Redeploy the application

?

Hi @Alex_Toader, here’s the link to my webapp: https://bryanchw-intent-classification-webapp-main-zhs9nz.streamlitapp.com/ It was deployed successfully before but I’m running into the same issues as [Hemanth_Sai] when I need to wake the app.

I’ve tried 1. delete the application 2. SSH keys get automatically removed after app deletion 3. redeploy and 1. delete github SSH 2. delete app 3. redeploy but still no luck. Thanks.

Is there any updates on this topic? my app was working fine a couple of days ago but now I am facing the exact same issue:

Failed to download the sources for repository

I’m having the same issue. Was deploying fine to cloud a few days ago but not now:


[22:11:14] 🐙 failed

[22:11:50] 🐙 failed

[22:12:26] 🐙 failed

[22:13:02] 🐙 failed

[22:13:39] 🐙 failed

[22:13:49] 🐙 Failed to download the sources for repository: '<REDACTED>', branch: 'main', main module: 'streamlit_app/resto_scorer/resto_scorer.py'

[22:13:49] 🐙 Make sure the repository and the branch exist and you have write access to it, and then reboot the app.```

Figured it out — had to get rid of a .gitattributes file in the repo that i was using to configure git lfs (large-file storage).

I don’t know what’s expected behavior here.

2 Likes

hey guys i am also facing this issue.

any solution yet for this issue?

@David_Brodsky you are right, i removed .gitattributes for lfs. it worked

Thanks

1 Like

OSError: You seem to have cloned a repository without having git-lfs installed. Please install git-lfs and run `git lfs install , after removing file

this error occurs because streamlit load files from the git hub , and git hub give 1 GB free bandwidth, when ever we load model again and again. the bandwidth limit exceed , after exceeding when we access this it show this error.

how to fix that ?

Without knowing exact details, the general answers would be:

  • Reduce the file size below 100MB, then you don’t need Git-LFS
  • Reduce the number of downloads from GitHub to avoid exceeding the bandwith limit
  • Store large data outside of GitHub
  • Wait a month until your data bandwith quota is reset
  • Buy a premium subscription from GitHub to get more bandwith
1 Like

The file I’m using git-lfs for is the model weights; sadly, it can’t be changed.
How can I store large data outside of GitHub and still use it in streamlit cloud for deployment? I am new to this :confused:

As I said, without knowing details, I can only give general advice:

Maybe the model can be downsized and retrained? I often see models that are overkill for the current problem and could also be solved with smaller models.

Load the model weights during runtime of the streamlit app from an external public URL, e.g. from Google Drive, One Drive and many more.