Error: No such command "switch-to-v7"

This update will cause a major version change in Frappe/ERPNext from 7 to 8.
This would take significant time to migrate and might break custom apps. Please run bench update --upgrade to confirm.

You can stay on the latest stable release by running bench switch-to-master or pin your bench to 7 by running bench switch-to-v7
jvfiel@jediknight2:~/frappe-wela-clients$ bench switch-to-v7
Usage: bench [OPTIONS] COMMAND [ARGS]…

Error: No such command “switch-to-v7”.
jvfiel@jediknight2:~/frappe-wela-clients$

Did I miss something?

We somehow figured it out there’s no swich-to-v7 in bench/update.py at master · frappe/bench · GitHub

facing same issue

@johnskywalker, @Davinder_Kumar

Version 8 has been merged into the master branch you will need to run the bench update --upgrade command to complete the update

Thanks,
Makarand

You did not understand the problem, i tried update bench to v8 bench but after that it show error Module import failed for Payment Tool (erpnext.accounts.doctype.payment_tool.payment_tool)
so i can’t take risk to update on production site so i want to switch to v7 on local server also so i can make some customizations in local server then can update on live site.

Hi thanks! but we don’t want to upgrade to version 8 yet. We want to stick with v7. Please see the log below

This update will cause a major version change in Frappe/ERPNext from 7 to 8.
This would take significant time to migrate and might break custom apps. Please run `bench update --upgrade` to confirm.

You can stay on the latest stable release by running `bench switch-to-master` or pin your bench to 7 by running `bench switch-to-v7`
jvfiel@jediknight2:~/frappe-wela-clients$ bench switch-to-v7
Usage: bench [OPTIONS] COMMAND [ARGS]...

Error: No such command "switch-to-v7".
jvfiel@jediknight2:~/frappe-wela-clients$

Any update to go back on v7?

Hi our team is working out on something. We manage to stop the v8 update. But we do not advise to use our procedure, because its not yet stable yet. We also figured out that bench/update.py at master · frappe/bench · GitHub has no switch-to-v7 that’s why it won’t let us do switch-to-v7

Please give me a solution. I have restore DB of v7 on v8(from remote to local server), if this is not possible then please help me to install v7. PLEASE PLEASE PLEASE!!

I switch branch in frappe and erpnext to “v7.0.x” but when i run bench update it shows opt/erp_v7/frappe-bench/env/bin/python: No module named sanitizer

Hi I’m afraid its going to be hard to go back to v7 because your database is now v8 right?

def switch_to_v7(apps=None, bench_path='.', upgrade=False):
	switch_branch('v7.x.x', apps=apps, bench_path=bench_path, upgrade=upgrade)

adding this to /app.py might work

also this

@click.command('switch-to-v7')
@click.option('--upgrade', is_flag=True)
def switch_to_v7(upgrade=False):
    "Switch frappe and erpnext to v7 branch"
    from bench.app import switch_to_v7
    switch_to_v7(upgrade=upgrade)
    print
    print 'Switched to v7'
    print 'Please run `bench update --patch` to be safe from any differences in database schema'

add to update.py

But we haven’t tested this approach yet, because we tried a different approach. Please do backups before you do anything else.

1 Like

Same result
Usage: bench [OPTIONS] COMMAND [ARGS]... Error: No such command "switch_to_v7".

you need to add switch_to_v7 in init.py also

i think someone should pull request about switch to v7 things :slight_smile:

1 Like

I manage to edit the bench and add v7, but still have issues. Will try again, will PR if works perfectly

1 Like

What is the latest solution to this problem?

I’m getting:

frappe@erp:~/frappe-bench$ bench switch-to-v7
Usage: bench [OPTIONS] COMMAND [ARGS]...

Error: No such command "switch-to-v7".

@jvantslot, I believe @johnskywalker managed to edit the something in bench in order to fix the problem. :slight_smile: Not sure if the pull request pushed through.

Hi all,
Is there any updates here?