[FIXED] Error on bench update 21-07

Hi all,

getting an error on bench update since last update.

bench update
INFO:bench.utils:updating bench
Already up-to-date.
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
From https://github.com/frappe/frappe
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
INFO:bench.app:pulling erpnext
error: object file .git/objects/61/b4a43d84090e216198ccbee0d3de44aff15050 is empty
error: object file .git/objects/61/b4a43d84090e216198ccbee0d3de44aff15050 is empty
fatal: loose object 61b4a43d84090e216198ccbee0d3de44aff15050 (stored in .git/objects/61/b4a43d84090e216198ccbee0d3de44aff15050) is corrupt
fatal: The remote end hung up unexpectedly
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 76, in _update
    pull_all_apps(bench_path=bench_path)
  File "/home/frappe/bench-repo/bench/app.py", line 97, in pull_all_apps
    exec_cmd("git pull {rebase} upstream {branch}".format(rebase=rebase, branch=get_current_branch(app, bench_path=bench_path)), cwd=app_dir)
  File "/home/frappe/bench-repo/bench/utils.py", line 100, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull  upstream develop

Can please have a look?

Thx

Hi @JoEz,

Seems issue with internet connection, try once again bench update and check.

Thanks, Rohit

@rohit_w same issue …i’ll try in 1 hour from another network …

@JoEz,

Run command git branch in erpnext folder and share output.

Thanks, Rohit

@rohit_w

frappe@erpnext:~/frappe-bench/apps/erpnext$ git branch
* develop

@JoEz It seems some data got corrupted, possibly due to a power failure, or a bug. Your best best would be to remove the app and reinstall it. I hope you don’t have any custom changes?

Do:

rm -rf apps/erpnext

Go into apps.txt and remove the line for erpnext completely.

Then do bench get-app https://github.com/frappe/erpnext

Thx, it worked

1 Like