ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

[Release] ERPNext Version 12


#21

@hpema108 and @DrTrills

Follow instructions for git to fetch all branches in the /apps/erpnext directory. then follow instructions above to bench update and bench switch-to-version11 (or 12)…


#22

Hi,

I am trying to update to V12, and when I run bench update, I get following error:
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
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.


#23

i am getting following error
bench.app.MajorVersionUpgradeException: Switching to version-12 will cause upgrade from 11 to 12. Pass --upgrade to confirm


#24

I confirm, there is an error getting Version 12 of ERPNEXT. (seemingly there is no Branch Version-12 for ERPNext)
Frappe does successfully switch-to-branch Version-12 but ERPNext does not.

Ref:
image


#25

Here is how I did it (though I am now working with a bunch of new errors)

  1. first go to: cd / home/frappe/frappe-bench/apps/frappe

and run:

git config remote.upstream.fetch "+refs/heads/*:refs/remotes/upstream/*"
git fetch upstream to fetch staging branch

  1. cd / home/frappe/frappe-bench/apps/erpnext

and run:

git config remote.upstream.fetch "+refs/heads/*:refs/remotes/upstream/*"
git fetch upstream to fetch staging branch

After this go to
cd / home/frappe/frappe-bench/
and you should be good to switch!


#26

Great news.

For the purposes of everyone’s sanity, I feel the upgrade instructions should include notes, or links, to backup and restore tasks. This will just complete my confidence to take the plunge.


#27

May I ask what kind of new errors?


#28

I am trying to stay on Ver 11. But I get the following message:

Branch version-11 does not exist in Upstream for erpnext

So is version-11 branch not ready for ERPNext yet?

Complete trail below.

Thanks

Jay

frappe@ip-172-31-27-24:~/frappe-bench$ bench --site sspl migrate
Migrating sspl
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [========================================]
Updating DocTypes for nhance : [========================================]
frappe@ip-172-31-27-24:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
remote: Enumerating objects: 26, done.
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 3), reused 2 (delta 1), pack-reused 0
Unpacking objects: 100% (5/5), done.
From https://github.com/frappe/bench
6d4df81…0859e55 master -> origin/master
Updating 6d4df81…0859e55
Fast-forward
playbooks/install.py | 12 +++++±-----
1 file changed, 6 insertions(+), 6 deletions(-)
master branch is renamed to version-11 and develop to version-12. Please switch to new branches to get future updates.

To switch to version 11, run the following commands: bench switch-to-branch version-11
frappe@ip-172-31-27-24:~/frappe-bench$ bench switch-to-branch version-11
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 8 (delta 4), reused 8 (delta 4), pack-reused 0
Unpacking objects: 100% (8/8), done.
From https://github.com/umaepoch/nhance
ac39858…1775523 master -> upstream/master
Branch version-11 does not exist in Upstream for nhance
From https://github.com/frappe/frappe
42bbca5…93022be version-12-hotfix -> upstream/version-12-hotfix
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-11
Already on ‘version-11’
Your branch is up-to-date with ‘upstream/version-11’.
INFO:bench.utils:git merge upstream/version-11
Already up-to-date.
Branch version-11 does not exist in Upstream for erpnext
Successfully switched branches for:
frappe
Switched to version-11
Please run bench update --patch to be safe from any differences in database schema


#29

INFO:bench.utils:yarn install
yarn install v1.17.3
[1/4] Resolving packages…
[2/4] Fetching packages…
error cypress-file-upload@3.1.0: The engine “node” is incompatible with this module. Expected version “>=8.2.1”. Got “6.17.1”
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
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 61, in update
_update(pull, patch, build, bench, auto, restart_supervisor, restart_systemd, requirements, no_backup, force=force, reset=reset)
File “/home/frappe/.bench/bench/commands/update.py”, line 85, in _update
update_node_packages(bench_path=bench_path)
File “/home/frappe/.bench/bench/utils.py”, line 452, in update_node_packages
update_yarn_packages(bench_path)
File “/home/frappe/.bench/bench/utils.py”, line 465, in update_yarn_packages
exec_cmd(‘yarn install’, cwd=app_path)
File “/home/frappe/.bench/bench/utils.py”, line 159, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: yarn install


#30

Have you tried this?

Updating Nodejs
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs


#31

Thanks @xickomesquita! Seems like that did the trick. It’s building the assets now so hopefully it’ll build with no issues. Looking forward to trying v12!


#32

Anyone noticed this?

digging further, i found that the attempt to fix the branch issue failed 2 hours ago in github. I assume this is why a lot of attempts to upgrade directly have been failing.


#33

Let us know if it works!


#34

ran into a similar issue as @DrTrills and this helped


[v12] Null module names on Desk
#35

Was the ability to install earlier versions (v10 especially) killed following this release? I just attempted to install v10 and even though the installation ran successfully i got presented with v12. Worse still, i cannot restore v10 backup on v12 as a long trace back error is thrown when i run bench migrate after backup is restored, effectively killing my instance.


#36

Just do what @DrTrills suggested, run this command on your erpnext directory, i.e /frappe-bench/apps/erpnext

git config remote.upstream.fetch "+refs/heads/*:refs/remotes/upstream/*"

and then

bench switch-to-branch version-12 --upgrade
bench update --patch


[Mega Thread] Version 12 Release Bugs
#37

I followed the instructions above and got this after completing the process:

This appeared on my home page

UPDATE: I rebooted the machine and i’m able to login. But only frappe seems to have migrated. How to i migrate erpnext? This is what i see.


#39

Please report and discuss issues here [Mega Thread] Version 12 Release Bugs


#40

This is what i have been trying to fix. So far i keep getting this error:

frappe.exceptions.DoesNotExistError: DocType Item Manufacturer not found

Full trace back

Updating DocTypes for frappe        : [========================================]
Updating DocTypes for erpnext       : [========================================]
Updating customizations for Address
Generating Website Theme Files...
Migrating erp.oceanbaycommunity.com
Executing erpnext.patches.v12_0.move_item_tax_to_item_tax_template in erp.oceanbaycommunity.com (7ac0bf1eac7575cd)
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/octo5/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/commands/site.py", line 233, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/migrate.py", line 48, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all
    if not run_single(patchmodule = patch):
  File "/home/octo5/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/octo5/frappe-bench/apps/erpnext/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py", line 44, in execute
    item.save()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py", line 271, in save
    return self._save(*args, **kwargs)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py", line 305, in _save
    self.validate_higher_perm_levels()
  File "/home/octo5/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/octo5/frappe-bench/apps/frappe/frappe/__init__.py", line 759, in get_meta
    return frappe.model.meta.get_meta(doctype, cached=cached)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/meta.py", line 37, in get_meta
    meta = Meta(doctype)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/meta.py", line 84, in __init__
    super(Meta, self).__init__("DocType", doctype)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py", line 104, in __init__
    self.load_from_db()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/meta.py", line 89, in load_from_db
    super(Meta, self).load_from_db()
  File "/home/octo5/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/octo5/frappe-bench/apps/frappe/frappe/__init__.py", line 360, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/octo5/frappe-bench/apps/frappe/frappe/__init__.py", line 346, in msgprint
    _raise_exception()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/__init__.py", line 315, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: DocType Item Manufacturer not found

#42

This is the correct command for it to work:

git config remote.upstream.fetch “+refs/heads/:refs/remotes/upstream/” from the erpnext folder.

And then:

bench switch-to-branch version-12 --upgrade
bench update --patch

Thanks

Jay