Git pull failed while deploying

Hi there :slightly_smiling_face:,
Anyone knowing why I got the following error while deploying my code ?
Does it really come from the .git/index.lock file ? Because when removing it locally then all my files get untracked and removed, but how can this happen with Github… :thinking:?


[manager] Processing dependencies …
[manager] Git pull failed: Git pull, cmd: sudo -u appuser git fetch origin && git reset --hard origin/master: error: exit status 128: fatal: Unable to create ‘/app/question-tagging/.git/index.lock’: File exists.

Another git process seems to be running in this repository, e.g. an editor opened by ‘git commit’. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue.
[manager] Error during processing dependencies! Please fix the error and push an update, or try restarting the app.

(the repository used)
Thank you for any advice :v:

1 Like
  • Fixed the problem with :
    I was trying to use git lfs to load my model.
    I uploaded in a dropbox instead and loaded it with :

    if not 'model.pkl' in os.listdir('.'):
        txt = st.warning("Téléchargement du modèle")
        url = "https://www.dropbox.com/s/.....?dl=1"
        r = requests.get(url, allow_redirects=True)
        open("model.pkl", 'wb').write(r.content)
        del r
        txt.success("Téléchargement terminé")
    
  • Now it’s not working because the file size (1.5Go) is bigger than the ressource for a free account :persevere:

1 Like

Hi there,
Thank you very much for sharing this.
I’m trying to use that solution with a .pth file using your code:

if not os.path.exists(path):
            txt = st.warning("downloading the model")
            url = "https://www.dropbox.com/scl/fi/gv32z1cw5nz7f62aosaxb/wav2lip_gan.pth?rlkey=sfbdg63up89mbkx9mxrtgei79&dl=0"
            r = requests.get(url, allow_redirects=True)
            st.write("hi")
            open(path, 'wb').write(r.content)
            del r
            txt.success("model downloaded")

but I keep hitting this error:

UnpicklingError: invalid load key, '<'.

Apparently, this doesn’t write the .pth file in the right way, can you please help me fix that?