V5 Upgrade Error

Hello Everyone!

I cannot sucessfully run bench update --upgrade, and get this error, which is similar to adityaduggal’s error:

laser@tremontlaser:~/frappe-bench$ sudo bench update --upgrade
Already up-to-date.
From https://github.com/frappe/frappe
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
From https://github.com/frappe/shopping-cart
 * branch            master     -> FETCH_HEAD
Already up-to-date.
From https://github.com/frappe/erpnext
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
You are using pip version 6.0.7, however version 6.0.8 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
You are using pip version 6.0.7, however version 6.0.8 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
You are using pip version 6.0.7, however version 6.0.8 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
database backup taken - ./site1.local/private/backups/20150318_94904202_database.sql.gz - on 2015-03-18 09:19:16.215373
Migrating site1.local
Executing erpnext.patches.v4_4.make_email_accounts in site1.local (site1.local)
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/laser/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 77, in <module>
    main()
  File "/home/laser/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 14, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/laser/frappe-bench/apps/frappe/frappe/commands.py", line 28, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/laser/frappe-bench/apps/frappe/frappe/commands.py", line 203, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/laser/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
  File "/home/laser/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/laser/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/laser/frappe-bench/apps/erpnext/erpnext/patches/v4_4/make_email_accounts.py", line 71, in execute
    account.insert()
  File "/home/laser/frappe-bench/apps/frappe/frappe/model/document.py", line 175, in insert
    self.db_insert()
  File "/home/laser/frappe-bench/apps/frappe/frappe/model/base_document.py", line 242, in db_insert
    ), d.values())
  File "/home/laser/frappe-bench/apps/frappe/frappe/database.py", line 129, in sql
    self._cursor.execute(query, values)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
frappe.exceptions.NameError: ('Email Account', u'Laserco', IntegrityError(1062, "Duplicate entry 'Laserco' for key 'PRIMARY'"))
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/laser/bench-repo/bench/cli.py", line 55, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/laser/bench-repo/bench/cli.py", line 243, in update
    patch_sites()
  File "/home/laser/bench-repo/bench/utils.py", line 117, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench=bench)
  File "/home/laser/bench-repo/bench/utils.py", line 422, in run_frappe_cmd
    subprocess.check_call((f, '-m', 'frappe.utils.bench_helper', 'frappe') + args, cwd=sites_dir)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '('/home/laser/frappe-bench/env/bin/python', '-m', 'frappe.utils.bench_helper', 'frappe', '--site', 'all', 'migrate')' returned non-zero exit status 1

Please let me know possible causes and solutions.
Thanks!

Try the following,

bench console

for e in frappe.get_list("Email Account"):
    frappe.delete_doc("Email Account", e['name'])
frappe.db.commit()

(This is a temp fix and you’ll have to reconfigure any email accounts, we will fix the patch soon)

Then run, bench update --patch --build

If you’re setup for production (ie. with nginx and supervisor),

bench setup redis-cache
bench setup supervisor
bench setup nginx
sudo supervisorctl reload
sudo service nginx reload

or if you’re in development mode ie. you use bench start

bench setup procfile
bench setup redis-cache
bench start

\cc @adityaduggal

After running

In [1]: for e in frappe.get_list(“Email Account”):
…: frappe.delete_doc(“Email Account”, e[‘name’])
…:

In [2]: frappe.db.commit()

In [3]: exit

in bench console, I still recieve that same error while running bench update --patch --build

Again, that error is:

laser@tremontlaser:~/frappe-bench$ bench update --patch --build
database backup taken - ./site1.local/private/backups/20150319_13408200_database.sql.gz - on 2015-03-19 08:42:12.381108
Migrating site1.local
Executing frappe.patches.v5_0.rename_ref_type_fieldnames in site1.local (site1.local)
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/laser/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 77, in <module>
    main()
  File "/home/laser/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 14, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/laser/frappe-bench/apps/frappe/frappe/commands.py", line 28, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/laser/frappe-bench/apps/frappe/frappe/commands.py", line 203, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/laser/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
  File "/home/laser/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/laser/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/laser/frappe-bench/apps/frappe/frappe/patches/v5_0/rename_ref_type_fieldnames.py", line 8, in execute
    frappe.db.sql("alter table `tabBulk Email` change `ref_docname` `reference_name` varchar(255)")
  File "/home/laser/frappe-bench/apps/frappe/frappe/database.py", line 140, in sql
    self._cursor.execute(query)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/laser/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 'ref_docname' in 'tabBulk Email'")
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/laser/bench-repo/bench/cli.py", line 55, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/laser/bench-repo/bench/cli.py", line 244, in update
    patch_sites()
  File "/home/laser/bench-repo/bench/utils.py", line 117, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench=bench)
  File "/home/laser/bench-repo/bench/utils.py", line 422, in run_frappe_cmd
    subprocess.check_call((f, '-m', 'frappe.utils.bench_helper', 'frappe') + args, cwd=sites_dir)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/home/laser/frappe-bench/env/bin/python', '-m', 'frappe.utils.bench_helper', 'frappe', '--site', 'all', 'migrate')' returned non-zero exit status 1

Please let me know of additional troubleshooting steps.
Thanks,
Michael

Try this,

bench reload-doc Email DocType "Bulk Email"
bench update --patch --build

I have tried this but I am still getting this error below:

    Executing frappe.patches.v5_0.bookmarks_to_stars in rigpl.local (040e7151bb)
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/aditya/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 77, in <module>
    main()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 14, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/commands.py", line 28, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/commands.py", line 203, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/patches/v5_0/bookmarks_to_stars.py", line 22, in execute
    view, doctype, docname = opts["route"].split("/")
ValueError: need more than 2 values to unpack
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/aditya/bench-repo/bench/cli.py", line 55, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/bench-repo/bench/cli.py", line 243, in update
    patch_sites()
  File "/home/aditya/bench-repo/bench/utils.py", line 117, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench=bench)
  File "/home/aditya/bench-repo/bench/utils.py", line 422, in run_frappe_cmd
    subprocess.check_call((f, '-m', 'frappe.utils.bench_helper', 'frappe') + args, cwd=sites_dir)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/home/aditya/frappe-bench/env/bin/python', '-m', 'frappe.utils.bench_helper', 'frappe', '--site', 'all', 'migrate')' returned non-zero exit status 1

Seems like an edge case in the patch, following can help me debug

Can you post the output of

for user in frappe.get_all("User"):
    username = user["name"]
    print frappe.db.get_default("_bookmarks", username)

in bench console

This is the output:

None
[{"route":"query-report/Items For Production","title":"Items For Production"},{"route":"query-report/Pending Orders","title":"Pending Orders"},{"route":"Report/Sales Order/Orders Received","title":"Report: Sales Order - Orders Received"},{"route":"query-report/Customer Addresses And Contacts2","title":"Customer Addresses And Contacts2"},{"route":"query-report/Price List","title":"Price List"},{"route":"query-report/Accounts Receivable","title":"Accounts Receivable"},{"route":"query-report/DN To Be Billed","title":"DN To Be Billed"}]
[{"route":"query-report/Items For Production","title":"Items For Production"},{"route":"query-report/Pending Orders","title":"Pending Orders"},{"route":"Report/Sales Order/Orders Received","title":"Report: Sales Order - Orders Received"},{"route":"query-report/Customer Addresses And Contacts2","title":"Customer Addresses And Contacts2"},{"route":"query-report/Price List","title":"Price List"},{"route":"query-report/Accounts Receivable","title":"Accounts Receivable"},{"route":"query-report/DN To Be Billed","title":"DN To Be Billed"}]
[{"route":"query-report/Items For Production","title":"Items For Production"},{"route":"query-report/Pending Orders","title":"Pending Orders"},{"route":"Report/Sales Order/Orders Received","title":"Report: Sales Order - Orders Received"},{"route":"query-report/Customer Addresses And Contacts2","title":"Customer Addresses And Contacts2"},{"route":"query-report/Price List","title":"Price List"},{"route":"query-report/Accounts Receivable","title":"Accounts Receivable"},{"route":"query-report/DN To Be Billed","title":"DN To Be Billed"}]
[{"route":"query-report/Items For Production","title":"Items For Production"},{"route":"query-report/Pending Orders","title":"Pending Orders"},{"route":"Report/Sales Order/Orders Received","title":"Report: Sales Order - Orders Received"},{"route":"query-report/Customer Addresses And Contacts2","title":"Customer Addresses And Contacts2"},{"route":"query-report/Price List","title":"Price List"},{"route":"query-report/Accounts Receivable","title":"Accounts Receivable"},{"route":"query-report/DN To Be Billed","title":"DN To Be Billed"}]
[]
[{"route":"Module/Manufacturing","title":"Manufacturing"},{"route":"query-report/Pending So (Prd)","title":"Pending So (Prd)"},{"route":"query-report/Pending Production Orders","title":"Pending Production Orders"},{"route":"List/Purchase Order","title":"Purchase Order List"}]
[{"route":"query-report/Pending Production Orders","title":"Query Report: Pending Production Orders"},{"route":"query-report/Pending Purchase Orders","title":"Query Report: Pending Purchase Orders"},{"route":"query-report/Pending So (Prd)","title":"Query Report: Pending So (Prd)"},{"route":"query-report/Stock Ledger Normal","title":"Query Report: Stock Ledger Normal"},{"route":"query-report/Items For Production","title":"Query Report: Items For Production"},{"route":"","title":"New Stock Entry 1"},{"route":"query-report/Item Report","title":"Query Report: Item Report"}]
[{"route":"query-report/Pending So (Prd)","title":"Query Report: Pending So (Prd)"},{"route":"query-report/Items For Production","title":"Query Report: Items For Production"}]
[{"route":"List/Purchase Order","title":"Purchase Order List"},{"route":"query-report/Accounts Payable","title":"Query Report: Accounts Payable"},{"route":"query-report/Accounts Receivable","title":"Query Report: Accounts Receivable"},{"route":"query-report/General Ledger","title":"Query Report: General Ledger"},{"route":"query-report/PR to be Billed","title":"Query Report: PR to be Billed"},{"route":"query-report/Pending Purchase Orders","title":"Query Report: Pending Purchase Orders"},{"route":"","title":"Desktop"}]
[{"route":"query-report/CForms Analysis","title":"CForms Analysis"},{"route":"query-report/Bank Reconciliation Statement","title":"Query Report: Bank Reconciliation Statement"},{"route":"List/ToDo","title":"ToDo List"},{"route":"query-report/PR to be Billed","title":"Query Report: PR to be Billed"},{"route":"List/Purchase Invoice","title":"Purchase Invoice List"},{"route":"query-report/Pending Purchase Orders","title":"Query Report: Pending Purchase Orders"},{"route":"query-report/Accounts Payable","title":"Query Report: Accounts Payable"},{"route":"query-report/Accounts Receivable","title":"Query Report: Accounts Receivable"},{"route":"query-report/General Ledger","title":"Query Report: General Ledger"},{"route":"List/Purchase Order","title":"Purchase Order List"}]
[{"route":"query-report/Pending Production Orders","title":"Query Report: Pending Production Orders"},{"route":"query-report/Items For Production","title":"Query Report: Items For Production"},{"route":"query-report/Pending So (Prd)","title":"Query Report: Pending So (Prd)"},{"route":"List/Stock Entry","title":"Stock Entry List"}]
[{"route":"query-report/Follow Up","title":"Query Report: Follow Up"},{"route":"query-report/Accounts Receivable","title":"Query Report: Accounts Receivable"},{"route":"Report/Sales Order/Orders Received","title":"Report: Sales Order - Orders Received"},{"route":"List/Sales Invoice","title":"Sales Invoice List"},{"route":"query-report/Items For Production","title":"Query Report: Items For Production"},{"route":"manufacturing-home","title":"Manufacturing"}]
[{"route":"query-report/Price List","title":"Query Report: Price List"},{"route":"query-report/Item Report","title":"Query Report: Item Report"}]
[{"route":"query-report/General Ledger","title":"Query Report: General Ledger"},{"route":"query-report/Accounts Receivable","title":"Query Report: Accounts Receivable"},{"route":"query-report/Stock Ledger Normal","title":"Query Report: Stock Ledger Normal"},{"route":"query-report/Items For Production","title":"Query Report: Items For Production"}]
[{"route":"query-report/Price List","title":"Query Report: Price List"},{"route":"query-report/Accounts Payable","title":"Query Report: Accounts Payable"},{"route":"query-report/Accounts Receivable","title":"Query Report: Accounts Receivable"},{"route":"query-report/General Ledger","title":"Query Report: General Ledger"},{"route":"query-report/Pending Orders","title":"Query Report: Pending Orders"},{"route":"query-report/Stock Ledger Normal","title":"Query Report: Stock Ledger Normal"},{"route":"query-report/Items For Production","title":"Query Report: Items For Production"}]
[{"route":"query-report/Price List","title":"Price List"},{"route":"query-report/Follow Up","title":"Query Report: Follow Up"},{"route":"Report/Sales Order/Orders Received","title":"Report: Sales Order - Orders Received"},{"route":"query-report/Pending Orders","title":"Query Report: Pending Orders"},{"route":"query-report/DN To Be Billed","title":"Query Report: DN To Be Billed"},{"route":"query-report/Items For Production","title":"Query Report: Items For Production"},{"route":"query-report/Pending Purchase Orders","title":"Query Report: Pending Purchase Orders"},{"route":"Report/Sales Invoice/Item Wise Sales Invoice","title":"Report: Sales Invoice - Item Wise Sales Invoice"},{"route":"query-report/General Ledger","title":"Query Report: General Ledger"},{"route":"query-report/Accounts Receivable","title":"Query Report: Accounts Receivable"},{"route":"sales-analytics","title":"Sales Analytics"}]
[{"route":"query-report/Sales Person-wise Transaction Summary","title":"Sales Person-wise Transaction Summary"},{"route":"query-report/Accounts Payable","title":"Accounts Payable"},{"route":"query-report/Bgh Stock","title":"Query Report: Bgh Stock"},{"route":"query-report/Stock Ledger with Valuation","title":"Query Report: Stock Ledger with Valuation"},{"route":"query-report/Items For Production","title":"Query Report: Items For Production"},{"route":"query-report/Accounts Receivable","title":"Query Report: Accounts Receivable"},{"route":"query-report/Item Report","title":"Query Report: Item Report"},{"route":"query-report/Follow Up","title":"Query Report: Follow Up"},{"route":"query-report/General Ledger","title":"Query Report: General Ledger"},{"route":"query-report/Orders To Dispatch","title":"Query Report: Orders To Dispatch"}]
[{"route":"query-report/Sales Person-wise Transaction Summary","title":"Sales Person-wise Transaction Summary"},{"route":"query-report/Accounts Payable","title":"Accounts Payable"},{"route":"query-report/Bgh Stock","title":"Query Report: Bgh Stock"},{"route":"query-report/Stock Ledger with Valuation","title":"Query Report: Stock Ledger with Valuation"},{"route":"query-report/Items For Production","title":"Query Report: Items For Production"},{"route":"query-report/Accounts Receivable","title":"Query Report: Accounts Receivable"},{"route":"query-report/Item Report","title":"Query Report: Item Report"},{"route":"query-report/Follow Up","title":"Query Report: Follow Up"},{"route":"query-report/General Ledger","title":"Query Report: General Ledger"},{"route":"query-report/Orders To Dispatch","title":"Query Report: Orders To Dispatch"}]
[{"route":"query-report/Orders To Dispatch","title":"Orders To Dispatch"},{"route":"query-report/Items For Production","title":"Items For Production"},{"route":"query-report/Stock Ledger Normal","title":"Query Report: Stock Ledger Normal"}]
[{"route":"Report/Sales Order/Orders Received","title":"Report: Sales Order - Orders Received"},{"route":"query-report/Pending Purchase Orders","title":"Query Report: Pending Purchase Orders"},{"route":"query-report/Pending Orders","title":"Query Report: Pending Orders"},{"route":"query-report/Stock Ledger Normal","title":"Query Report: Stock Ledger Normal"},{"route":"query-report/Item Report","title":"Query Report: Item Report"},{"route":"query-report/Price List","title":"Query Report: Price List"},{"route":"query-report/Items For Production","title":"Query Report: Items For Production"}]
[{"route":"query-report/General Ledger","title":"Query Report: General Ledger"},{"route":"query-report/DN To Be Billed","title":"Query Report: DN To Be Billed"},{"route":"query-report/Accounts Payable","title":"Query Report: Accounts Payable"},{"route":"query-report/Accounts Receivable","title":"Query Report: Accounts Receivable"},{"route":"List/Customer","title":"Customer List"}]
[{"route":"Form/Payment Tool","title":"Payment Tool"},{"route":"query-report/Accounts Payable","title":"Query Report: Accounts Payable"},{"route":"query-report/Accounts Receivable","title":"Query Report: Accounts Receivable"},{"route":"query-report/General Ledger","title":"Query Report: General Ledger"},{"route":"List/Purchase Invoice","title":"Purchase Invoice List"},{"route":"List/Journal Voucher","title":"Journal Voucher List"},{"route":"List/Purchase Order","title":"Purchase Order List"},{"route":"query-report/Pending Purchase Orders","title":"Query Report: Pending Purchase Orders"},{"route":"query-report/Purchase Order Trends","title":"Query Report: Purchase Order Trends"},{"route":"Form/Bank Reconciliation","title":"Bank Reconciliation"}]
[{"route":"query-report/Item Report","title":"Item Report"},{"route":"Module/Selling","title":"Sales Invoice List"},{"route":"Form/Sales Order/New Sales Order 1","title":"New Sales Order 1"},{"route":"Form/Sales Order/SOOG141500990","title":"SOOG141500990"},{"route":"query-report/DN To Be Billed","title":"Query Report: DN To Be Billed"},{"route":"Form/Sales Invoice/ADI/02513-1","title":"ADI/02513-1"}]
[{"route":"query-report/Pending Orders","title":"Query Report: Pending Orders"},{"route":"query-report/Stock Ledger with Valuation","title":"Query Report: Stock Ledger with Valuation"},{"route":"query-report/Pending Production Orders","title":"Query Report: Pending Production Orders"},{"route":"query-report/Accounts Payable","title":"Query Report: Accounts Payable"},{"route":"query-report/General Ledger","title":"Query Report: General Ledger"},{"route":"query-report/Accounts Receivable","title":"Query Report: Accounts Receivable"},{"route":"query-report/Pending Purchase Orders","title":"Query Report: Pending Purchase Orders"},{"route":"query-report/Price List","title":"Query Report: Price List"},{"route":"query-report/Item Report","title":"Query Report: Item Report"},{"route":"query-report/Items For Production","title":"Query Report: Items For Production"},{"route":"query-report/Items On Indent","title":"Query Report: Items On Indent"}]
[{"route":"query-report/DN To Be Billed","title":"DN To Be Billed"},{"route":"query-report/Pending Orders","title":"Pending Orders"},{"route":"query-report/Pending Purchase Orders","title":"Pending Purchase Orders"},{"route":"Report/Sales Order/Orders Received","title":"Report: Sales Order - Orders Received"},{"route":"List/Purchase Receipt","title":"Purchase Receipt List"},{"route":"query-report/Item Report","title":"Item Report"},{"route":"List/Stock Entry","title":"Stock Entry List"},{"route":"query-report/Pending Production Orders","title":"Pending Production Orders"},{"route":"List/Purchase Order","title":"Purchase Order List"},{"route":"query-report/Orders To Dispatch","title":"Orders To Dispatch"},{"route":"List/Sales Order","title":"Sales Order List"}]
[{"route":"query-report/Items For Production","title":"Query Report: Items For Production"},{"route":"query-report/Item Report","title":"Query Report: Item Report"},{"route":"List/Sales Order","title":"Sales Order List"}]
[{"route":"query-report/DN To Be Billed","title":"Query Report: DN To Be Billed"},{"route":"List/Delivery Note","title":"Delivery Note List"},{"route":"manufacturing-home","title":"Manufacturing"},{"route":"todo","title":"To Do"},{"route":"query-report/Pending Orders","title":"Query Report: Pending Orders"},{"route":"List/Sales Order","title":"Selling"},{"route":"accounts-home","title":"Accounts"},{"route":"stock-home","title":"Stock"}]
[{"route":"query-report/DN To Be Billed","title":"Query Report: DN To Be Billed"},{"route":"List/Delivery Note","title":"Delivery Note List"},{"route":"manufacturing-home","title":"Manufacturing"},{"route":"todo","title":"To Do"},{"route":"query-report/Pending Orders","title":"Query Report: Pending Orders"},{"route":"List/Sales Order","title":"Selling"},{"route":"accounts-home","title":"Accounts"},{"route":"stock-home","title":"Stock"}]
[{"route":"query-report/DN To Be Billed","title":"Query Report: DN To Be Billed"},{"route":"List/Delivery Note","title":"Delivery Note List"},{"route":"manufacturing-home","title":"Manufacturing"},{"route":"todo","title":"To Do"},{"route":"query-report/Pending Orders","title":"Query Report: Pending Orders"},{"route":"List/Sales Order","title":"Selling"},{"route":"accounts-home","title":"Accounts"},{"route":"stock-home","title":"Stock"}]

That helped!
pushed a fix

bench update --pull --patch --build

This fixed the bookmarks but now I think there is a problem with stock reconciliation patch as the below error shows:

Executing erpnext.patches.v5_0.convert_stock_reconciliation in rigpl.local (040e7151bb)
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/aditya/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 77, in <module>
    main()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 14, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/commands.py", line 28, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/commands.py", line 203, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/aditya/frappe-bench/apps/erpnext/erpnext/patches/v5_0/convert_stock_reconciliation.py", line 13, in execute
    "item_code": item.item_code,
AttributeError: 'list' object has no attribute 'item_code'
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/aditya/bench-repo/bench/cli.py", line 55, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/bench-repo/bench/cli.py", line 244, in update
    patch_sites()
  File "/home/aditya/bench-repo/bench/utils.py", line 117, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench=bench)
  File "/home/aditya/bench-repo/bench/utils.py", line 422, in run_frappe_cmd
    subprocess.check_call((f, '-m', 'frappe.utils.bench_helper', 'frappe') + args, cwd=sites_dir)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/home/aditya/frappe-bench/env/bin/python', '-m', 'frappe.utils.bench_helper', 'frappe', '--site', 'all', 'migrate')' returned non-zero exit status 1

@adityaduggal fixed. please update again.

@adityaduggal I am online on gitter if you are patching your db

https://gitter.im/frappe/erpnext

Still getting similar error:

laser@tremontlaser:~/frappe-bench$ bench reload-doc Email DocType "Bulk Email"
laser@tremontlaser:~/frappe-bench$ bench update --patch --build
database backup taken - ./site1.local/private/backups/20150320_61650619_database.sql.gz - on 2015-03-20 13:44:19.462216
Migrating site1.local
Executing frappe.patches.v5_0.rename_ref_type_fieldnames in site1.local (site1.local)
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/laser/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 77, in <module>
    main()
  File "/home/laser/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 14, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/laser/frappe-bench/apps/frappe/frappe/commands.py", line 28, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/laser/frappe-bench/apps/frappe/frappe/commands.py", line 203, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/laser/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
  File "/home/laser/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/laser/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/laser/frappe-bench/apps/frappe/frappe/patches/v5_0/rename_ref_type_fieldnames.py", line 9, in execute
    frappe.db.sql("alter table `tabBulk Email` change `ref_docname` `reference_name` varchar(255)")
  File "/home/laser/frappe-bench/apps/frappe/frappe/database.py", line 140, in sql
    self._cursor.execute(query)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/laser/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1060, "Duplicate column name 'reference_name'")
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/laser/bench-repo/bench/cli.py", line 55, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/laser/bench-repo/bench/cli.py", line 244, in update
    patch_sites()
  File "/home/laser/bench-repo/bench/utils.py", line 117, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench=bench)
  File "/home/laser/bench-repo/bench/utils.py", line 422, in run_frappe_cmd
    subprocess.check_call((f, '-m', 'frappe.utils.bench_helper', 'frappe') + args, cwd=sites_dir)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/home/laser/frappe-bench/env/bin/python', '-m', 'frappe.utils.bench_helper', 'frappe', '--site', 'all', 'migrate')' returned non-zero exit status 1

Can you update and check again?

I tried to update but I guess there is an error in the mentioned commit
https://github.com/frappe/erpnext/commit/aca5c7b5801209918d6b479365faa99f69144e87

This is the error I am getting on update:

Executing erpnext.patches.v5_0.convert_stock_reconciliation in rigpl.local (040e7151bb)
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/aditya/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 77, in <module>
    main()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 14, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/commands.py", line 28, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/commands.py", line 203, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/aditya/frappe-bench/apps/erpnext/erpnext/patches/v5_0/convert_stock_reconciliation.py", line 19, in execute
    "valuation_rate": row[4] if len(row) > 3 else None
IndexError: list index out of range
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/aditya/bench-repo/bench/cli.py", line 55, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/bench-repo/bench/cli.py", line 244, in update
    patch_sites()
  File "/home/aditya/bench-repo/bench/utils.py", line 117, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench=bench)
  File "/home/aditya/bench-repo/bench/utils.py", line 422, in run_frappe_cmd
    subprocess.check_call((f, '-m', 'frappe.utils.bench_helper', 'frappe') + args, cwd=sites_dir)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/home/aditya/frappe-bench/env/bin/python', '-m', 'frappe.utils.bench_helper', 'frappe', '--site', 'all', 'migrate')' returned non-zero exit status 1