Change branch from v13 beta6 to v13 rebrand-ui branch: issue with patch

Hi together,
we have setup for testing purpose a ERPNext v13 beta6 installation (up and running :wink: ).

Now we would like to test the rebrand-ui. Therefore we understood to run the following commands:

  1. Change the branch to rebrand-ui: sudo bench switch-to-branch rebrand-ui frappe erpnext --upgrade
  2. Run bench update: bench update → Here we got stuck
  3. run requirements: bench setup requirements
  4. do a migrate: bench migrate

We are faced now with an error running the bench update, especially /apps/frappe/frappe/patches/v13_0/update_icons_in_customized_desk_page.py.

[..]

Installing node dependencies for frappe
$ yarn install
yarn install v1.22.10
[1/4] Resolving packages...
success Already up-to-date.
$ yarn run snyk-protect
yarn run v1.22.10
$ snyk protect
Successfully applied Snyk patches

Done in 5.95s.
Done in 7.17s.
Patching sites...
Migrating dev.mydomain.com
Executing frappe.patches.v13_0.update_icons_in_customized_desk_pages in dev.mydomain.com (_fa9800f1eacc08da)
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/utils/bench_helper.py", line 99, in <module>
    main()
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/commands/__init__.py", line 26, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/commands/site.py", line 296, in migrate
    skip_search_index=skip_search_index
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/migrate.py", line 67, in migrate
    frappe.modules.patch_handler.run_all(skip_failing)
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/modules/patch_handler.py", line 41, in run_all
    run_patch(patch)
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/modules/patch_handler.py", line 30, in run_patch
    if not run_single(patchmodule = patch):
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/modules/patch_handler.py", line 71, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/modules/patch_handler.py", line 91, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/patches/v13_0/update_icons_in_customized_desk_pages.py", line 10, in execute
    default_icon[page.extends] = frappe.db.get_value("Desk Page", page.extends, "icon")
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/database/database.py", line 407, in get_value
    order_by, cache=cache, for_update=for_update)
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/database/database.py", line 451, in get_values
    out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update, for_update=for_update)
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/database/database.py", line 604, in _get_values_from_table
    values, as_dict=as_dict, debug=debug, update=update)
  File "/home/erpnextdev/frappe-bench-2/apps/frappe/frappe/database/database.py", line 147, in sql
    self._cursor.execute(query, values)
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/pymysql/connections.py", line 517, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/pymysql/connections.py", line 732, in _read_query_result
    result.read()
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/pymysql/connections.py", line 1075, in read
    first_packet = self.connection._read_packet()
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/pymysql/connections.py", line 684, in _read_packet
    packet.check_error()
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/pymysql/protocol.py", line 220, in check_error
    err.raise_mysql_exception(self._data)
  File "/home/erpnextdev/frappe-bench-2/env/lib/python3.6/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.InternalError: (1054, "Unknown column 'icon' in 'field list'")

Any ideas on how to handle this?

i have the same issue

Do you have V13 beta 6 VM or OVA file?

I would like to receive it.

Hi @Sanath_Udayawansa2, in the meantime we had upgraded to the latest branch and then switched to rebrand-ui branch - that has worked for us.
An no, we have set it up regularly via the Easy-Installscript within a regular ubuntu-based server.

1 Like