ERPNext Conference 2019* ERPNext.com Blog

[Mega Thread] Version 12 Release Bugs


#18

Check it out and try!

v12 Upgrade


#19

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

#21

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")

#22

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

#23

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).


#24

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

bench run-patch erpnext.patches.v12_0.make_item_manufacturer


[Release] ERPNext Version 12
#25

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.


#26

Another bug I found:

When I click on Chart of Accounts from this page:

I received this:


#27

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


#28

Try this WrongOptionsDoctypeLinkError: Item: Options must be a valid DocType for field Manufacturers in row 130


#29

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


[Release] ERPNext Version 12
#30

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


#31

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


#32

Hi… I’m trying to install version 12 correctly…

Some issues:

  1. I can’t manage users permissions
  2. My Quality Management module seams to be broke:

Maye I had broked it, when I tried to fix the null issue on v12 (probably did a wrong git command…).

Somebody knows how to reinstall that module?


#33

Pull the v12 branch again and then run migrate.


#34

Hi, after version 12 upgrade, modules are hidden from the desk. What could be the problem? What did I do wrong?


#35

Both frappe and erpnext needs to be on version 12. Can you please double check by running command bench version from frappe-bench folder.

Thanks & Regards,
Kalpit


#36

This is not the standard feature (you may be running another dashboard in your custom app)


#37

okay, it seems, it upgraded frappe, but not erpnext fully

Output

bench version
erpnext 11.1.48
frappe 12.0.0
fatal: not a git repository (or any of the parent directories): .gitPreformatted text


#38

Thank you for your help… We have mixed it up with the previous dashboard app that we were exploring.