Problem upgrading to version 7

Please advise on the problem I have.
Operatin System: Ubuntu 14.04.4

:~/bench-repo$ git branch

  • master

:~/bench-repo$ git show
commit 73a6593fb9a252e93c7a117763bf4f4a658e8564
Merge: 40e2df9 daabbd8
Author: Rushabh Mehta rmehta@gmail.com
Date: Tue Jul 26 09:22:09 2016 +0530

Merge branch 'develop'

:~/bench-repo$ bench update
INFO:bench.utils:updating bench
Already up-to-date.
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
From github/frappe/frappe

  • branch master -> FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext
    From github/frappe/erpnext
  • branch master -> FETCH_HEAD
    Already up-to-date.
    /home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see urllib3.readthedocs/en/latest/security.html#snimissingwarning.
    SNIMissingWarning
    /home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
    InsecurePlatformWarning
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    Migrating site1.local
    Executing erpnext.patches.v7_0.rename_fee_amount_to_fee_component in site1.local (1bd3e0294d)
    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/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
    main()
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 700, in call
    return self.main(*args, **kwargs)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 680, in main
    rv = self.invoke(ctx)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 508, in invoke
    return callback(*args, **kwargs)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 16, in new_func
    return f(get_current_context(), *args, **kwargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/site.py”, line 203, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/migrate.py”, line 27, in migrate
    frappe.modules.patch_handler.run_all()
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
    if not run_single(patchmodule = patch):
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + “.execute”)()
    File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/patches/v7_0/rename_fee_amount_to_fee_component.py”, line 13, in execute
    rename_field(dt, “amount”, “components”)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/utils/rename_field.py”, line 24, in rename_field
    (new_fieldname, old_fieldname))
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/database.py”, line 137, in sql
    self._cursor.execute(query, values)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
    self.errorhandler(self, exc, value)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
    raise errorclass, errorvalue
    _mysql_exceptions.ProgrammingError: (1146, “Table ‘1bd3e0294d.tabFee Component’ doesn’t exist”)
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 9, in
    load_entry_point(‘bench==0.92’, ‘console_scripts’, ‘bench’)()
    File “/home/ubuntu/bench-repo/bench/cli.py”, line 40, in cli
    bench_command()
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 700, in call
    return self.main(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 680, in main
    rv = self.invoke(ctx)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 508, in invoke
    return callback(*args, **kwargs)
    File “/home/ubuntu/bench-repo/bench/commands/update.py”, line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
    File “/home/ubuntu/bench-repo/bench/commands/update.py”, line 90, in _update
    patch_sites(bench_path=bench_path)
    File “/home/ubuntu/bench-repo/bench/utils.py”, line 124, in patch_sites
    run_frappe_cmd(’–site’, ‘all’, ‘migrate’, bench_path=bench_path)
    File “/home/ubuntu/bench-repo/bench/utils.py”, line 453, in run_frappe_cmd
    raise CommandFailedError(args)
    bench.utils.CommandFailedError: (’–site’, ‘all’, ‘migrate’)

Thanks

@s_list Fixed!! Pull latest updates via bench update.

Solved, thank you

Hi,

Im not sure if I did this right but im still getting the error

hemant@VarmaniHQ:~/frappe-bench/apps/erpnext$ git remote -v
origin https://github.com/Varmani/erpnext.git (fetch)
origin https://github.com/Varmani/erpnext.git (push)
upstream https://github.com/frappe/erpnext (fetch)
upstream https://github.com/frappe/erpnext (push)
hemant@VarmaniHQ:~/frappe-bench/apps/erpnext$ git pull upstream
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 24 (delta 4), reused 0 (delta 0), pack-reused 8
Unpacking objects: 100% (24/24), done.
From https://github.com/frappe/erpnext
18f622f…9b542f3 develop -> upstream/develop
29628f3…1adb77e hotfix -> upstream/hotfix

  • [new branch] v6.x.x -> upstream/v6.x.x
  • [new tag] v6.27.22 -> v6.27.22
  • [new tag] v6.27.23 -> v6.27.23
  • [new tag] v6.27.24 -> v6.27.24
  • [new tag] v6.27.25 -> v6.27.25
  • [new tag] v6.27.26 -> v6.27.26
  • [new tag] v7.0.0 -> v7.0.0
  • [new tag] v7.0.1 -> v7.0.1
  • [new tag] v7.0.2 -> v7.0.2
  • [new tag] v7.0.3 -> v7.0.3
  • [new tag] v7.0.4 -> v7.0.4
    Already up-to-date.
    hemant@VarmaniHQ:~/frappe-bench/apps/erpnext$ bench migtrate
    Usage: bench [OPTIONS] COMMAND [ARGS]…

Error: No such command “migtrate”.
hemant@VarmaniHQ:~/frappe-bench/apps/erpnext$ bench migrate
Migrating www.varmani.co.za
Executing erpnext.patches.v7_0.rename_fee_amount_to_fee_component in www.varmani.co.za (e7d1040a24)
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/hemant/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/hemant/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/hemant/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/hemant/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/hemant/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/hemant/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/hemant/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/hemant/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/hemant/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/hemant/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/hemant/frappe-bench/apps/frappe/frappe/commands/site.py”, line 203, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/hemant/frappe-bench/apps/frappe/frappe/migrate.py”, line 27, in migrate
frappe.modules.patch_handler.run_all()
File “/home/hemant/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/hemant/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/hemant/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/hemant/frappe-bench/apps/erpnext/erpnext/patches/v7_0/rename_fee_amount_to_fee_component.py”, line 13, in execute
rename_field(dt, “amount”, “components”)
File “/home/hemant/frappe-bench/apps/frappe/frappe/model/utils/rename_field.py”, line 24, in rename_field
(new_fieldname, old_fieldname))
File “/home/hemant/frappe-bench/apps/frappe/frappe/database.py”, line 137, in sql
self._cursor.execute(query, values)
File “/home/hemant/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/hemant/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, “Table ‘e7d1040a24.tabFee Component’ doesn’t exist”)
hemant@VarmaniHQ:~/frappe-bench/apps/erpnext$

Hi all,

I have the same error with a few differences:

Executing erpnext.patches.v7_0.rename_fee_amount_to_fee_component in site1.local (1bd3e0294d)
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/eagle/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/eagle/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/eagle/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/eagle/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/eagle/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/eagle/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/eagle/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/eagle/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/eagle/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/eagle/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/eagle/frappe-bench/apps/frappe/frappe/commands/site.py”, line 203, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/eagle/frappe-bench/apps/frappe/frappe/migrate.py”, line 27, in migrate
frappe.modules.patch_handler.run_all()
File “/home/eagle/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/eagle/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/eagle/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/eagle/frappe-bench/apps/erpnext/erpnext/patches/v7_0/rename_fee_amount_to_fee_component.py”, line 13, in execute
rename_field(dt, “amount”, “components”)
File “/home/eagle/frappe-bench/apps/frappe/frappe/model/utils/rename_field.py”, line 24, in rename_field
(new_fieldname, old_fieldname))
File “/home/eagle/frappe-bench/apps/frappe/frappe/database.py”, line 137, in sql
self._cursor.execute(query, values)
File “/home/eagle/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/eagle/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, “Table ‘1bd3e0294d.tabFee Component’ doesn’t exist”)
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.0.0’, ‘console_scripts’, ‘bench’)()
File “/home/eagle/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/eagle/bench-repo/bench/commands/update.py”, line 60, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
File “/home/eagle/bench-repo/bench/commands/update.py”, line 90, in _update
patch_sites(bench_path=bench_path)
File “/home/eagle/bench-repo/bench/utils.py”, line 124, in patch_sites
run_frappe_cmd(’–site’, ‘all’, ‘migrate’, bench_path=bench_path)
File “/home/eagle/bench-repo/bench/utils.py”, line 453, in run_frappe_cmd
raise CommandFailedError(args)
bench.utils.CommandFailedError: (’–site’, ‘all’, ‘migrate’)

Same problem here

Executing erpnext.patches.v7_0.rename_fee_amount_to_fee_component in test.com (1bd3e0294d)
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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 203, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 27, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
    return execute_patch(patchmodule, method, methodargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v7_0/rename_fee_amount_to_fee_component.py", line 13, in execute
    rename_field(dt, "amount", "components")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/utils/rename_field.py", line 24, in rename_field
    (new_fieldname, old_fieldname))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 137, in sql
    self._cursor.execute(query, values)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, "Table '1bd3e0294d.tabFee Component' doesn't exist")
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==3.0.0', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 90, in _update
    patch_sites(bench_path=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 124, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench_path=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 453, in run_frappe_cmd
    raise CommandFailedError(args)
bench.utils.CommandFailedError: ('--site', 'all', 'migrate')

We have identified the issue and fixed it on a develop branch, we’ll release it soon.
Sorry for the inconvenience.

1 Like

Awesome,
I really love this fast problem solving.
And great support!!

@jkeersmaekers @hpema108 @RWEMA_Aimable

We have released a fix for the issue, please pull the updates.