Dear Experts,
Has anyone been successful in updating the bench + apps in an environment where there is a remote database server configuration?
I have tried many times and have always hit the following error:
File "/home/strella/frappe-bench/apps/frappe/frappe/model/document.py", line 467, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/strella/frappe-bench/apps/frappe/frappe/model/document.py", line 400, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/strella/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 87, in on_update
updatedb(self.name)
File "/home/strella/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 390, in updatedb
tab.sync()
File "/home/strella/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 170, in sync
self.create()
File "/home/strella/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 90, in create
CHARACTER SET=utf8""" % (self.name, add_text))
File "/home/strella/frappe-bench/apps/frappe/frappe/database.py", line 119, in sql
self._cursor.execute(query)
File "/home/strella/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/home/strella/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1050, "Table 'tabsales invoice' already exists")
Error: None
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/strella/bench-repo/bench/cli.py", line 26, in cli
def cli():
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 572, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 552, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 893, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 744, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 388, in invoke
return callback(*args, **kwargs)
File "/home/strella/bench-repo/bench/cli.py", line 96, in update
@click.option('--auto',flag_value=True, type=bool)
File "/home/strella/bench-repo/bench/utils.py", line 77, in patch_sites
exec_cmd("{frappe} --latest all".format(frappe=get_frappe(bench=bench)), cwd=os.path.join(bench, 'sites'))
File "/home/strella/bench-repo/bench/utils.py", line 56, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/home/strella/frappe-bench/env/bin/frappe --latest all' returned non-zero exit status 1
The only solution that I have is:
1) Backup + restore the remote database to the local database
2) Revert site_config.json to use back the local database
3) Run 'bench update'
4) Backup + restore the local database back to the remote database server
It is honestly quite tedious.... Look forward to seeing if any of you have good solutions to this. Thanks once again.
Javier
–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/fde9173f-0a64-4fa5-abfa-7123fd517148%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.