Existing sites in VM, how to upgrade to v5.0? use frappe



On 16-Sep-2014, at 8:59 pm, Y Y <ya...@gmail.com> wrote:

Dear Team,

as far a i know, existing site in VM and locally we setup, is using develop branch. how can we upgrade to v5.0 using bench command?

Go to `frappe-bench/apps/frappe` and `frappe-bench/apps/erpnext`

and fetch and checkout the 5.0 branch

git fetch upstream
git checkout -b v5.0 upstream/v5.0




Best Regards,
Yang



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/bdcf6d1f-3806-42b1-8f16-4b02f589c139%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/E7B7B1F1-D44E-49AB-85FB-7D7D71095A76%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.

Hello rmehta,

I followed your instructions and now I cannot access erpnext anymore. I get a 502 Bad Gateway error (nginx/1.2.1). What did I do wrong?

Thanks for your help,

Best regards

Did you do bench frappe --latest ?

I get this error when I’m typing this:

Traceback (most recent call last):
File “/home/erpnext/frappe-bench/env/bin/frappe”, line 9, in
load_entry_point(‘frappe==4.0.0’, ‘console_scripts’, ‘frappe’)()
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/pkg_resources.py”, line 353, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/pkg_resources.py”, line 2302, in load_entry_point
return ep.load()
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/pkg_resources.py”, line 2029, in load
entry = import(self.module_name, globals(),globals(), [‘name’])
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 13, in
from frappe.version import version
File “/home/erpnext/frappe-bench/apps/frappe/frappe/version.py”, line 1
<<<<<<< HEAD
^
SyntaxError: invalid syntax

Anything I can do to undo the changes and get everything back to normal?
I still have this 502 bad gateway error…

Thank you for your help

Did you try to upgrade to v5?

That is what I tried to do but I’m stuck. What I did so far is:

Go to frappe-bench/apps/frappe and frappe-bench/apps/erpnext
and fetch and checkout the 5.0 branch

git fetch upstream
git checkout -b v5.0 upstream/v5.0

and

bench frappe --latest

But there is no bench migrate-to-v5 command available…

What is the correct step to upgrade?

Start with a working v4 bench
run

bench update
bench migrate-to-v5

I get this error:

Error: No such command “migrate-to-v5”.

I am running on VM these versions:

Installed Apps  ERPNext: v4.17.0
Open Source Enterprise Resource Planning for Small and Midsized OrganizationsFrappe Framework: v4.9.3
Full Stack Web Application Framework in PythonShopping Cart: v0.6.0
Online Shopping Cart integrated with ERPNext

When I try the bench --help, migrate-to-v5 is not listed…

Did you run a bench update first?

yes, I did. This is the only options I get:

erpnext@erpnext-vm:~/frappe-bench$ bench --help
Usage: bench [OPTIONS] COMMAND [ARGS]…

Bench manager for Frappe

Options:
–help Show this message and exit.

Commands:
backup backup site
backup-all-sites backup all sites
config change bench configuration
get-app clone an app from the internet and set it up…
init Create a new bench
migrate-3to4 Migrate from ERPNext v3.x
new-app start a new app
new-site Create a new site in the bench
prime-wheel-cache Update wheel cache
release Release app (internal to the Frappe team)
restart Restart supervisor processes
set-default-site Set default site for bench
set-nginx-port Set nginx port for site
setup Setup bench
shell
start Start Frappe development processes
update Update bench

Is there any step-by-step explanation page to upgrade, I guess I missed something…

bench update
bench migrate-to-v5

are the only steps required. bench update updates the bench utility as well. In your case I think it’s not installed as editable. You can try reinstalling it

sudo pip uninstall bench
sudo pip install -e /path/to/bench-repo

I get this:

Can't uninstall 'bench'. No files were found to uninstall.

How did you install? Did you use the easy install script?

I used the ready-to-use VM file downloaded on your website

Hi @mouuuton

I am using the VM for testing as well…but bench update and bench migrate-to-5 works for me…for some reason I had to login as root:erpnext and navigate to cd /home/bench<<<

But I can confirm this as a working process for the latest VM!

Daniel

Hi Daniel !
Thanks for your answer. I tried but I still have the same error: Error: No such command "migrate-to-v5".

I’ll go with a fresh install I guess…

@mouuuton try bench --help for a list of commands