Stuck between Versions 4 & 5

Hi,

I’m on Frappe Bench and I did a whole bunch of things and after all that here’s where I am:

This post includes the following:

The situation when I run bench start
The errors when I run bench update
The errors when I run bench switch-to-v4
The errors when I run bench switch-to-master

I would like to move to Version 5, but if that’s a hassle can I get back online with Version 4?

Thanks

Jay

If I hit bench start, this is what I see:

10:14:46 system | worker.1 started (pid=5698)
10:14:46 system | workerbeat.1 started (pid=5700)
10:14:46 system | web.1 started (pid=5702)
10:14:48 web.1 | * Running on http://0.0.0.0:8000/
10:14:48 web.1 | * Restarting with reloader
10:14:48 workerbeat.1 | celery beat v3.1.13 (Cipater) is starting.
10:14:49 workerbeat.1 | __ - … __ - _
10:14:49 workerbeat.1 | Configuration ->
10:14:49 workerbeat.1 | . broker -> redis://localhost:6379//
10:14:49 workerbeat.1 | . loader -> celery.loaders.app.AppLoader
10:14:49 workerbeat.1 | . scheduler -> celery.beat.PersistentScheduler
10:14:49 workerbeat.1 | . db -> scheduler.schedule
10:14:49 workerbeat.1 | . logfile -> [stderr]@%INFO
10:14:49 workerbeat.1 | . maxinterval -> now (0s)
10:14:49 workerbeat.1 | [2015-04-30 10:14:49,011: INFO/MainProcess] beat: Starting…
10:14:49 worker.1 |
10:14:49 worker.1 | -------------- celery@promantest-erpn v3.1.13 (Cipater)
10:14:49 worker.1 | ---- **** -----
10:14:49 worker.1 | — * *** * – Linux-3.13.0-32-generic-i686-athlon-with-Ubuntu-14.04-trusty
10:14:49 worker.1 | – * - **** —
10:14:49 worker.1 | - ** ---------- [config]
10:14:49 worker.1 | - ** ---------- .> app: frappe:0xb67a2a2c
10:14:49 worker.1 | - ** ---------- .> transport: redis://localhost:6379//
10:14:49 worker.1 | - ** ---------- .> results: disabled
10:14:49 worker.1 | - *** — * — .> concurrency: 2 (prefork)
10:14:49 worker.1 | – ******* ----
10:14:49 worker.1 | — ***** ----- [queues]
10:14:49 worker.1 | -------------- .> celery exchange=celery(direct) key=celery
10:14:49 worker.1 |
10:14:49 worker.1 |
10:14:49 workerbeat.1 | [2015-04-30 10:14:49,315: INFO/MainProcess] Scheduler: Sending due task scheduler (frappe.tasks.enqueue_scheduler_events)
10:14:50 worker.1 | [2015-04-30 10:14:50,469: WARNING/MainProcess] celery@promantest-erpn ready.

However, http://localhost:8000 says “Updating! We’ll be back in a few moments”

When I try bench update, this is the error I get:

promantest@promantest-erpn:~/frappe-bench$ bench update
Already up-to-date.
From https://github.com/frappe/erpnext

Running latest for promantest.local

Executing erpnext.patches.v4_2.fix_recurring_orders in promantest.local (promantest.local)
Traceback (most recent call last):
File “/home/promantest/frappe-bench/env/bin/frappe”, line 9, in
load_entry_point(‘frappe==4.1.0’, ‘console_scripts’, ‘frappe’)()
File “/home/promantest/frappe-bench/apps/frappe/frappe/cli.py”, line 39, in main
ret = run(fn, args)
File “/home/promantest/frappe-bench/apps/frappe/frappe/cli.py”, line 83, in run
out = globals().get(fn)(**args)
File “/home/promantest/frappe-bench/apps/frappe/frappe/cli.py”, line 67, in new_fn
return fn(*args, **new_kwargs)
File “/home/promantest/frappe-bench/apps/frappe/frappe/cli.py”, line 431, in latest
frappe.modules.patch_handler.run_all()
File “/home/promantest/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/promantest/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 50, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/promantest/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 66, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/promantest/frappe-bench/apps/erpnext/erpnext/patches/v4_2/fix_recurring_orders.py”, line 27, in execute
and (per_received > 0 or per_billed > 0)""", as_dict=1)
File “/home/promantest/frappe-bench/apps/frappe/frappe/database.py”, line 121, in sql
self._cursor.execute(query)
File “/home/promantest/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/promantest/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1054, “Unknown column ‘is_recurring’ in ‘where clause’”)
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/promantest/bench-repo/bench/cli.py”, line 55, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/promantest/bench-repo/bench/cli.py”, line 247, in update
patch_sites()
File “/home/promantest/bench-repo/bench/utils.py”, line 116, in patch_sites
exec_cmd("{frappe} --latest all".format(frappe=get_frappe(bench=bench)), cwd=os.path.join(bench, ‘sites’))
File “/home/promantest/bench-repo/bench/utils.py”, line 72, 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/promantest/frappe-bench/env/bin/frappe --latest all’ returned non-zero exit status 1

When I try bench switch-to-v4, this is the error I get:

promantest@promantest-erpn:~/frappe-bench$ bench switch-to-v4
Already on ‘v4.x.x’
Your branch is up-to-date with ‘upstream/v4.x.x’.
Already on ‘v4.x.x’
Your branch is up-to-date with ‘upstream/v4.x.x’.
error: pathspec ‘v4.x.x’ did not match any file(s) known to git.
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/promantest/bench-repo/bench/cli.py”, line 55, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/promantest/bench-repo/bench/cli.py”, line 309, in _switch_to_v4
switch_to_v4()
File “/home/promantest/bench-repo/bench/app.py”, line 156, in switch_to_v4
switch_branch(‘v4.x.x’, apps=apps, bench=bench)
File “/home/promantest/bench-repo/bench/app.py”, line 147, in switch_branch
exec_cmd(“git checkout {branch}”.format(branch=branch), cwd=app_dir)
File “/home/promantest/bench-repo/bench/utils.py”, line 72, 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 ‘git checkout v4.x.x’ returned non-zero exit status 1

When I try bench switch-to-master, this is the error I get:

promantest@promantest-erpn:~/frappe-bench$ bench switch-to-master
Switched to branch ‘master’
Your branch is up-to-date with ‘upstream/master’.
Switched to branch ‘master’
Your branch is up-to-date with ‘upstream/master’.
error: pathspec ‘master’ did not match any file(s) known to git.
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/promantest/bench-repo/bench/cli.py”, line 55, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/promantest/bench-repo/bench/cli.py”, line 293, in _switch_to_master
switch_to_master()
File “/home/promantest/bench-repo/bench/app.py”, line 150, in switch_to_master
switch_branch(‘master’, apps=apps, bench=bench)
File “/home/promantest/bench-repo/bench/app.py”, line 147, in switch_branch
exec_cmd(“git checkout {branch}”.format(branch=branch), cwd=app_dir)
File “/home/promantest/bench-repo/bench/utils.py”, line 72, 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 ‘git checkout master’ returned non-zero exit status 1

This patch is breaking:

Seems like you are updating after a very long time. Maybe @nabinhait can have a look when he is free