Updating ERPnext from v11 to v12 Problem

i’m helal alans from [Al-Razi University] (http://www.alraziuni.edu.ye/) Yemen
i try to update ERPnext from v11 to v12
but it shown this code

frappe@vmi276324:~$ bench update --patch
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 32, in update
File “/home/frappe/.bench/bench/patches/init.py”, line 21, in run
result = execute(bench_path)
File “/home/frappe/.bench/bench/patches/v3/celery_to_rq.py”, line 7, in execute
frappe_branch = get_current_branch(‘frappe’, bench_path)
File “/home/frappe/.bench/bench/app.py”, line 280, in get_current_branch
return get_cmd_output(“basename $(git symbolic-ref -q HEAD)”, cwd=repo_dir)
File “/home/frappe/.bench/bench/utils.py”, line 365, in get_cmd_output
output = subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess.PIPE).strip()
File “/usr/lib/python2.7/subprocess.py”, line 567, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File “/usr/lib/python2.7/subprocess.py”, line 711, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory: ‘./apps/frappe’

Please help

You need to be in the correct subdir

cd ~/frappe-bench
bench update --reset

1 Like

thank you for your cooperation
we are updated to new version 12 but it updated frappe to 12 and ERP Next still version 11 and the modules is disapeared.
please help us with rest procedures

If you run these commands, it should update both

sed -i.bak 's//master///g’ ~/frappe-bench/apps/erpnext/.git/config #replace /master with / (copy the original file to *.bak)
bench switch-to-branch version-12 frappe erpnext --upgrade
bench update --patch

the problem still as the past

the problem still as the past
IT Shown this message

It looks like you only switched frappe to v12, and not erpnext. If you are stuck in the “loop” where it sends you from v11 to v12 to v11, then you also need to run the sed command in the post above.
In summary…

sed -i.bak 's/\/master/\/*/g' ~/frappe-bench/apps/erpnext/.git/config
bench switch-to-branch version-12 frappe erpnext --upgrade
bench update --patch

Hello team,

i got same issues frappe is updated to 12.0.13 butt erpnext is still 11.1.62 . Is anything have to modify in erpnext app in .git/config file ?

Can you tell what this command does ?
sed -i.bak ‘s//master//*/g’ ~/frappe-bench/apps/erpnext/.git/config

Tried these commands but frappe is 12 and erpnext is in 11

#Since the v11/v12 changes, ERPNext upgrades quite weirdly - gives a bunch of messages which loop on themselves
   #To fix... (thanks to @lasalesi who posted about this on the ERPNext forum)
      #The default .git "config" file has a section...
      [remote "upstream"]
              fetch = +refs/heads/master:refs/remotes/upstream/master
      #"master" needs to become "*" #all occurrences, NB!: without the quotes
      [remote "upstream"]
              fetch = +refs/heads/*:refs/remotes/upstream/*
#Edit the file: apps > erpnext> .git > config :
   #nano ~/frappe-bench/apps/erpnext/.git/config
      #[remote "upstream"]
      #    url = https://github.com/frappe/erpnext
      #    fetch = +refs/heads/*:refs/remotes/upstream/*
#   OR   #
sed -i.bak 's/\/master/\/*/g' ~/frappe-bench/apps/erpnext/.git/config   #replace /master with /* (copy the original file to *.bak)

Thanks trentmu i will check it out