Update bench error

I have ran bench update command and got me below error

[new tag] v0.9 -> v0.9
[new tag] v0.91 -> v0.91
[new tag] v0.92 -> v0.92
[new tag] v0.93 -> v0.93
[new tag] v2.0 -> v2.0
[new tag] v2.1 -> v2.1
[new tag] v3.0 -> v3.0
[new tag] v4.0 -> v4.0
fatal: refusing to merge unrelated histories
Traceback (most recent call last):
File “/opt/bitnami/apps/erpnext/htdocs/venv/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/opt/bitnami/apps/erpnext/htdocs/bench/bench/cli.py”, line 40, in cli
bench_command()
File “/opt/bitnami/apps/erpnext/htdocs/venv/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/venv/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/opt/bitnami/apps/erpnext/htdocs/venv/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return processresult(sub_ctx.command.invoke(sub_ctx))
File “/opt/bitnami/apps/erpnext/htdocs/venv/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/opt/bitnami/apps/erpnext/htdocs/venv/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/bench/bench/commands/update.py”, line 34, in update
update_bench()
File “/opt/bitnami/apps/erpnext/htdocs/bench/bench/utils.py”, line 254, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/opt/bitnami/apps/erpnext/htdocs/bench/bench/utils.py”, line 153, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

Please help me to update the bench

try this

Bench update error: Bench.utils.CommandFailedError: git pull

or search >

raise CommandFailedError(cmd)

bench.utils.CommandFailedError: git pull

from the forum.

1 Like

Another error

return f(get_current_context(), *args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/commands/site.py”, line 223, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/migrate.py”, line 39, in migrate
frappe.modules.patch_handler.run_all()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 81, in execute_patch
exec(patchmodule.split(“execute:”)[1],globals())
File “”, line 1, in
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/database/database.py”, line 165, in sql
self._cursor.execute(query)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py”, line 516, in query
self.affectedrows = self.readquery_result(unbuffered=unbuffered)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py”, line 727, in readquery_result
result.read()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py”, line 1066, in read
first_packet = self.connection.readpacket()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py”, line 683, in readpacket
packet.check_error()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘IF NOT EXISTS (name)’ at line 1")

do bench update --reset

It is MYSQL error, Any suggestions?

Just wondering, what version did you update from?

version 10

I need this to be upgraded to V 11