[Mega Thread] Version 12 Release Bugs

Hi, when i upgrade to version 12 i have this error. ERROR: frontmatter 3.0.5 has requirement PyYAML==3.13, but you’ll have pyyaml 5.1.1 which is incompatible.

Try
bench setup requirements

Hi,

{product setting under webpage}

Encounter the following error on V12.
I have tested by adding a Paypal payment gateway. Later try to manage the product setting under webpage. It prompted the following error :

==================================================
Uncaught Server Exception

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 48, in render
data = render_page_by_language(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 152, in render_page_by_language
return render_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 168, in render_page
return build(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 175, in build
return build_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 188, in build_page
context = get_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py”, line 28, in get_context
context = build_context(context)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py”, line 87, in build_context
ret = context.doc.get_context(context)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/doctype/item_group/item_group.py”, line 73, in get_context
“products_as_list”: cint(frappe.db.get_single_value(‘Products Settings’, ‘products_as_list’))
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 558, in get_single_value
frappe.throw(_(‘Invalid field name: {0}’).format(frappe.bold(fieldname)), self.InvalidColumnName)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 360, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 346, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 315, in _raise_exception
raise raise_exception(msg)
frappe.database.database.Database.InvalidColumnName: Invalid field name: products_as_list

After updating V12 Desk not showing few modules and Show / Hide Cards showing null modules.

@rk_root

Hi,
I am getting following error while using bench update:

 File "/home/frappe/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py", line 483, in make_custom_fields
    create_custom_fields(custom_fields, update=update)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 147, in create_custom_fields
    custom_field.save()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 271, in save
    return self._save(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 324, in _save
    self.run_post_save_methods()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 917, in run_post_save_methods
    self.run_method("on_update")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 786, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1055, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1038, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 780, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 61, in on_update
    validate_fields_for_doctype(self.dt)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 562, in validate_fields_for_doctype
    validate_fields(frappe.get_meta(doctype, cached=False))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 823, in validate_fields
    check_link_table_options(meta.get("name"), d)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 607, in check_link_table_options
    frappe.throw(_("{0}: Options must be a valid DocType for field {1} in row {2}").format(docname, d.label, d.idx), WrongOptionsDoctypeLinkError)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 360, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 346, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 315, in _raise_exception
    raise raise_exception(msg)
frappe.core.doctype.doctype.doctype.WrongOptionsDoctypeLinkError: Item: Options must be a valid DocType for field Manufacturers in row 130

Please help! Thanks.

Check it out and try!

v12 Upgrade

Hi all, I was able to switch to V12 but now get this error:

$ sudo bench switch-to-branch version-12
Switching for erpnext
INFO:bench.utils:git config --unset-all remote.upstream.fetch
INFO:bench.utils:git config --add remote.upstream.fetch '+refs/heads/*:refs/remotes/upstream/*'
INFO:bench.utils:git fetch upstream
INFO:bench.utils:git checkout version-12
Already on 'version-12'
Your branch is up-to-date with 'upstream/version-12'.
INFO:bench.utils:git merge upstream/version-12
Already up-to-date.
Switching for frappe
INFO:bench.utils:git config --unset-all remote.upstream.fetch
INFO:bench.utils:git config --add remote.upstream.fetch '+refs/heads/*:refs/remotes/upstream/*'
INFO:bench.utils:git fetch upstream
INFO:bench.utils:git checkout version-12
Already on 'version-12'
Your branch is up-to-date with 'upstream/version-12'.
INFO:bench.utils:git merge upstream/version-12
Already up-to-date.
Successfully switched branches for:
erpnext
frappe
Switched to version-12
Please run `bench update --patch` to be safe from any differences in database schema


SERVER@erpnextv12:/home/frappe/frappe-bench$ sudo bench update --patch
    npm WARN checkPermissions Missing write access to /home/frappe/frappe-bench/node_modules/async-limiter
    npm WARN checkPermissions Missing write access to /home/frappe/frappe-bench/node_modules/has-binary2/node_modules/isarray
    npm WARN checkPermissions Missing write access to /home/frappe/frappe-bench/node_modules/socket.io-parser/node_modules/isarray
    npm WARN checkPermissions Missing write access to /home/frappe/frappe-bench/node_modules/has-binary2/node_modules
    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.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
    npm WARN frappe@ No description
    npm ERR! Linux 3.16.0-4-amd64
    npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "socket.io"
    npm ERR! node v6.17.1
    npm ERR! npm  v3.10.10
    npm ERR! path /home/frappe/frappe-bench/node_modules/async-limiter
    npm ERR! code EACCES
    npm ERR! errno -13
    npm ERR! syscall access

    npm ERR! Error: EACCES: permission denied, access '/home/frappe/frappe-bench/node_modules/async-limiter'
    npm ERR!     at Error (native)
    npm ERR!  { Error: EACCES: permission denied, access '/home/frappe/frappe-bench/node_modules/async-limiter'
    npm ERR!     at Error (native)
    npm ERR!   errno: -13,
    npm ERR!   code: 'EACCES',
    npm ERR!   syscall: 'access',
    npm ERR!   path: '/home/frappe/frappe-bench/node_modules/async-limiter' }
    npm ERR!
    npm ERR! Please try running this command again as root/Administrator.

    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/frappe/frappe-bench/npm-debug.log
    Traceback (most recent call last):
      File "/usr/local/bin/bench", line 11, in <module>
        load_entry_point('bench', 'console_scripts', 'bench')()
      File "/home/frappe/.bench/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/bench/commands/update.py", line 32, in update
        patches.run(bench_path='.')
      File "/home/frappe/.bench/bench/patches/__init__.py", line 21, in run
        result = execute(bench_path)
      File "/home/frappe/.bench/bench/patches/v4/update_socketio.py", line 4, in execute
        subprocess.check_output(['npm', 'install', 'socket.io'])
      File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
        raise CalledProcessError(retcode, cmd, output=output)
    subprocess.CalledProcessError: Command '['npm', 'install', 'socket.io']' returned non-zero exit status 243

Table doesn’t exist error - But I can see this table should be under performance schema DB

image

Executing frappe.patches.v12_0.replace_null_values_in_tables in site1.local (1bd3e0294da19198                 )
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, 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 97, in <mod                 ule>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, 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                  764, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line                  717, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line                  1137, 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                  1137, 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                  956, 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                  555, 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 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 233, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 48, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in r                 un_all
    if not run_single(patchmodule = patch):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in r                 un_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in e                 xecute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/patches/v12_0/replace_null_values_in_tab                 les.py", line 19, in execute
    .format(table=table, columns=", ".join(update_column_table_map.get(table))))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 171, in sql
    self._cursor.execute(query)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py",                  line 170, in execute
    result = self._query(query)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py",                  line 328, in _query
    conn.query(q)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.p                 y", line 517, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.p                 y", line 732, in _read_query_result
    result.read()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.p                 y", line 1075, in read
    first_packet = self.connection._read_packet()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.p                 y", line 684, in _read_packet
    packet.check_error()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/protocol.py",                  line 220, in check_error
    err.raise_mysql_exception(self._data)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py", line                  109, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, u"Table '1bd3e0294da19198.events_waits_current' doesn't                  exist")

Hi all,

Ran into an issue while updating from v11 to v12

while doing ‘bench update --patch’

at the step Executing erpnext.patches.v12_0.move_item_tax_to_item_tax_template in site1.local

got an error ‘DocType Item Manufacturer not found’

Any ideas?

Error Traceback log

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, 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 97, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, 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 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, 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 1137, 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 956, 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 555, 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 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 233, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 48, 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/v12_0/move_item_tax_to_item_tax_template.py", line 44, in execute
    item.save()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 271, in save
    return self._save(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 305, in _save
    self.validate_higher_perm_levels()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 572, in validate_higher_perm_levels
    high_permlevel_fields = frappe.get_meta(df.options).meta.get_high_permlevel_fields()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 759, in get_meta
    return frappe.model.meta.get_meta(doctype, cached=cached)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 37, in get_meta
    meta = Meta(doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 84, in __init__
    super(Meta, self).__init__("DocType", doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 104, in __init__
    self.load_from_db()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 89, in load_from_db
    super(Meta, self).load_from_db()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 147, in load_from_db
    frappe.throw(_("{0} {1} not found").format(_(self.doctype), self.name), frappe.DoesNotExistError)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 360, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 346, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 315, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: DocType Item Manufacturer not found
1 Like

I’ve got exactly the same problem while trying to upgrade v11 to v12.

Only difference I see is that i’m on python 3.5 and it seems you are still on 2.7

Is there a way to manually add the DocType (as the web interface isn’t working anymore).

Run the following before update. It seems patches are in the wrong order.

bench run-patch erpnext.patches.v12_0.make_item_manufacturer

1 Like

I have this bug in v12’s Dashboard Widget. I set a Role for this particular widget and when I hit “Save”, the role was cleared.

Another bug I found:

When I click on Chart of Accounts from this page:

I received this:

Your interface seems to be different. This is what i have on mine and everything is fine:

check to see if you’re on Version-12 as shown in this screenshot:

image

1 Like

Try this WrongOptionsDoctypeLinkError: Item: Options must be a valid DocType for field Manufacturers in row 130 - #3 by Deepika

Pull the changes from the version-12 branch and check again. This is working correctly for me:

Thank you, Worked like a charm.

bench run-patch erpnext.patches.v12_0.make_item_manufacturer

That fixed that error and then ran bench update --patch

I did run into a problem with the website couldn’t login, I think there was an issue with css js files

I rebooted and ran bench update again and everything seems fine now, will report any bugs or issues I come across

It worked fine but I had to install in develop first, then I setup the production.

sudo python install.py --develop --user frappe
sudo bench setup production --user frappe

Still testing the v12 features