Bench update after fresh installation error

I did a fresh install using


sudo bash --setup-production

after install I tried to bench update. I got this error.

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==3.0.0', 'console_scripts', 'bench')()
  File "/home/deploy/bench-repo/bench/", line 40, in cli
  File "/usr/local/lib/python2.7/dist-packages/click/", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/deploy/bench-repo/bench/commands/", line 31, in update
    version_upgrade = is_version_upgrade()
  File "/home/deploy/bench-repo/bench/", line 102, in is_version_upgrade
    upstream_version = get_upstream_version('frappe', bench=bench, branch=branch)
  File "/home/deploy/bench-repo/bench/", line 144, in get_upstream_version
    contents = subprocess.check_output(['git', 'show', 'upstream/{branch}:{app}/'.format(branch=branch)], cwd=repo_dir, stderr=subprocess.STDOUT, app=app)
KeyError: 'app'

Any idea?

1 Like

Fixed. Can you update again?

If it still doesn’t work, go to /home/deploy/bench-repo and do a git pull first before running bench update again.

1 Like

@anand its now working. thanks!