Bench migrate-to-v5 Error!


I seem to bothering again. Running “bench migrate-to-v5” command on a frappe bench freshly installed in Ubuntu getting the following error :

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/", line 38, in cli
    return bench()
  File "/usr/local/lib/python2.7/dist-packages/click/", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/", line 208, in _migrate_to_v5
  File "/home/erpnext/bench-repo/bench/", line 14, in migrate_to_v5
    checkout_v5(repo, bench=bench)
  File "/home/erpnext/bench-repo/bench/", line 47, in checkout_v5
    exec_cmd("git checkout v5.0", cwd=cwd)
  File "/home/erpnext/bench-repo/bench/", line 61, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'git checkout v5.0' returned non-zero exit status 1

Anything wrong with my setup??


What is your remote? If you are using your own fork, make sure it has the v5.0 branch.

No not using my fork … used the simple commands as illustrated at frappe/bench/readme. however when I run “git remote” … the only thing I see is upstream.

run git fetch upstream

successfully runs under frappe app but has no effect under erpnext app

I suspect it’s not fetching the refs.

What’s the output of

cd frappe-bench/apps/erpnext
git config --list

Hi ,

i had simmlar problem

here my result :
remote.upstream.url=GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)


In the erpnext dir,

git config --unset-all remote.upstream.fetch
git config --add remote.upstream.fetch
1 Like

its really awesome…its workss…