New Update error gst_state

Unable to update to 8.4 :persevere:

Screen is stuck at system being updated

INFO:bench.utils:git pull  upstream master
remote: Counting objects: 269, done.
remote: Compressing objects: 100% (43/43), done.
Receiving objects: 100% (269/269), 1.63 MiB | 0 bytes/s, done.
remote: Total 269 (delta 218), reused 224 (delta 201), pack-reused 25
Resolving deltas: 100% (221/221), completed with 124 local objects.
From https://github.com/frappe/erpnext
 * branch            master     -> FETCH_HEAD
   a8406e1..012f5b0  master     -> upstream/master
Updating a8406e1..012f5b0
Fast-forward
 erpnext/__init__.py                  |    2 +-
 .../pricing_rule/pricing_rule.py     |    2 +-
 .../test_pricing_rule.py             |   50 +-
 erpnext/accounts/page/pos/pos.js     |    4 +-
 erpnext/accounts/party.py            |   12 +-
 .../supplier_quotation_item.json     |   97 +-
 .../controllers/taxes_and_totals.py  |    2 +-
 .../opportunity/opportunity.py       |    4 +-
 erpnext/docs/license.html            |    4 +-
 .../user/videos/learn/navigation.md  |    4 +-
 .../production_order.js              |    4 +-
 erpnext/patches.txt                  |    5 +-
 .../create_warehouse_nestedset.py    |    2 +-
 .../v8_1/add_hsn_sac_codes.py        |   10 +
 .../patches/v8_1/update_gst_state.py |    6 +
 .../js/controllers/accounts.js       |    6 +-
 .../controllers/taxes_and_totals.js  |    2 +-
 .../js/controllers/transaction.js    |   15 +-
 .../serial_no_batch_selector.js      |    8 +
 erpnext/regional/india/__init__.py   |   14 +-
 .../india/hsn_code_data.json         | 4960 +++++++++++
 .../india/sac_code_data.json         | 2398 +++++
 erpnext/regional/india/setup.py      |   41 +-
 .../assessment_plan.js               |    1 +
 .../course_wise_assessment_report.py |  168 +-
 .../doctype/customer/customer.py     |    2 +-
 .../sales_order/sales_order.py       |    8 +-
 .../delivery_note/delivery_note.py   |   11 +-
 .../stock_entry/stock_entry.js       |    7 +-
 .../support/doctype/issue/issue.py   |    4 +-
 .../includes/taxes.html              |    2 +-
 erpnext/translations/am.csv          |  476 +-
 erpnext/translations/ar.csv          |  642 +-
 erpnext/translations/bg.csv          |  476 +-
 erpnext/translations/bn.csv          |  476 +-
 erpnext/translations/bs.csv          |  476 +-
 erpnext/translations/ca.csv          |  476 +-
 erpnext/translations/cs.csv          |  476 +-
 erpnext/translations/da-DK.csv       |    2 +-
 erpnext/translations/da.csv          |  476 +-
 erpnext/translations/de.csv          |  478 +-
 erpnext/translations/el.csv          |  476 +-
 erpnext/translations/es-AR.csv       |    1 -
 erpnext/translations/es-CL.csv       |    5 +-
 erpnext/translations/es-PE.csv       |  119 +-
 erpnext/translations/es.csv          |  882 +-
 erpnext/translations/et.csv          |  476 +-
 erpnext/translations/fa.csv          |  476 +-
 erpnext/translations/fi.csv          |  476 +-
 erpnext/translations/fr.csv          |  516 +-
 erpnext/translations/gu.csv          |  476 +-
 erpnext/translations/he.csv          |  370 +-
 erpnext/translations/hi.csv          |  476 +-
 erpnext/translations/hr.csv          |  476 +-
 erpnext/translations/hu.csv          |  600 +-
 erpnext/translations/id.csv          |  476 +-
 erpnext/translations/is.csv          |  476 +-
 erpnext/translations/it.csv          |  594 +-
 erpnext/translations/ja.csv          |  476 +-
 erpnext/translations/km.csv          |  476 +-
 erpnext/translations/kn.csv          |  476 +-
 erpnext/translations/ko.csv          |  476 +-
 erpnext/translations/ku.csv          |  476 +-
 erpnext/translations/lo.csv          |  476 +-
 erpnext/translations/lt.csv          |  476 +-
 erpnext/translations/lv.csv          |  476 +-
 erpnext/translations/mk.csv          |  476 +-
 erpnext/translations/ml.csv          |  476 +-
 erpnext/translations/mr.csv          |  476 +-
 erpnext/translations/ms.csv          |  476 +-
 erpnext/translations/my.csv          |  476 +-
 erpnext/translations/nl.csv          |  476 +-
 erpnext/translations/no.csv          |  476 +-
 erpnext/translations/pl.csv          |  476 +-
 erpnext/translations/ps.csv          |  476 +-
 erpnext/translations/pt-BR.csv       |  328 +-
 erpnext/translations/pt.csv          |  476 +-
 erpnext/translations/ro.csv          |  476 +-
 erpnext/translations/ru.csv          |  476 +-
 erpnext/translations/si.csv          |  476 +-
 erpnext/translations/sk.csv          |  476 +-
 erpnext/translations/sl.csv          |  476 +-
 erpnext/translations/sq.csv          |  476 +-
 erpnext/translations/sr-SP.csv       |  188 +-
 erpnext/translations/sr.csv          |  476 +-
 erpnext/translations/sv.csv          |  476 +-
 erpnext/translations/ta.csv          |  476 +-
 erpnext/translations/te.csv          |  476 +-
 erpnext/translations/th.csv          |  476 +-
 erpnext/translations/tr.csv          |  513 +-
 erpnext/translations/uk.csv          |  475 +-
 erpnext/translations/ur.csv          |  469 +-
 erpnext/translations/vi.csv          | 1306 +--
 erpnext/translations/zh-TW.csv       |  449 +-
 erpnext/translations/zh.csv          |  482 +-
 95 files changed, 23374 insertions(+), 14320 deletions(-)
 create mode 100644 erpnext/patches/v8_1/add_hsn_sac_codes.py
 create mode 100644 erpnext/patches/v8_1/update_gst_state.py
 create mode 100644 erpnext/regional/india/sac_code_data.json
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
/home/frappe/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 https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/home/frappe/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.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
/home/frappe/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 https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/home/frappe/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.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
Updating node libraries...
INFO:bench.utils:npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN frappe@ No description
Backing up sites...
Patching sites...
Migrating site1.local
Executing erpnext.patches.v8_1.update_gst_state in site1.local (1bd3e0294da19198)
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 91, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 17, 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 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, 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 1066, 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 895, 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 535, 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 216, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 31, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all
    if not run_single(patchmodule = patch):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v8_1/update_gst_state.py", line 6, in execute
    frappe.db.sql("update `tabAddress` set gst_state='Chhattisgarh' where gst_state='Chattisgarh'")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 153, in sql
    self._cursor.execute(query)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 250, in execute
    self.errorhandler(self, exc, value)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
    raise errorvalue
_mysql_exceptions.OperationalError: (1054, "Unknown column 'gst_state' in 'where clause'")
1 Like

Same here… any fix around?

1 Like

@Max_Fun, @abhinavjain,

Fixed please run the bench migrate command to complete the migration process

@makarand_b
Still getting same error

frappe@ns1:~/frappe-bench$ bench migrate
Migrating site1.local
Executing erpnext.patches.v8_1.update_gst_state in site1.local (1bd3e0294da19198)
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 91, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 17, 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 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, 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 1066, 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 895, 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 535, 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 216, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 31, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all
    if not run_single(patchmodule = patch):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v8_1/update_gst_state.py", line 6, in execute
    frappe.db.sql("update `tabAddress` set gst_state='Chhattisgarh' where gst_state='Chattisgarh'")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 153, in sql
    self._cursor.execute(query)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 250, in execute
    self.errorhandler(self, exc, value)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
    raise errorvalue
_mysql_exceptions.OperationalError: (1054, "Unknown column 'gst_state' in 'where clause'")
frappe@ns1:~/frappe-bench$
1 Like

Yep… SAme error here

did you pull the latest changes? if not please run the bench update --pull command first before running bench update

2 Likes

Trying now

Great !
It works Thanks @makarand_b

Yes, it worked now. Thanks @makarand_b