Try ERPNext Buy Support Partners Foundation

[Release] ERPNext Version 12

Let us know if it works!

ran into a similar issue as @DrTrills and this helped

1 Like

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.

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

1 Like

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.

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

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

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

1 Like

I tried your method but just in erpnext dir and it failed when building frappe assets. I then repeated it but this time i ran git config remote.upstream.fetch “+refs/heads/ :refs/remotes/upstream/ ” also on the frappe dir and everything worked fine but i got we will be back soon when trying to log in.

I have checked supervisor status using supervisorctl status and everything is running. I also restarted but no luck.

UPDATE:

I just checked my web.error.log file and found this error:

Traceback (most recent call last):
  File "/home/octo5/frappe-bench/env/bin/gunicorn", line 10, in <module>
    sys.exit(run())
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 223, in run
    super(Application, self).run()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 60, in __init__
    self.setup(app)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 120, in setup
    self.app.wsgi()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgia$
    return util.import_app(self.app_uri)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/app.py", line 27, in <module>
    import frappe.recorder
  File "/home/octo5/frappe-bench/apps/frappe/frappe/recorder.py", line 14, in <module>
    import sqlparse
ModuleNotFoundError: No module named 'sqlparse'

Any idea if this could be the cause?

Actually, I didn’t miss the *s in the command. The forum doesn’t show the *s. So replacing the * with (star) for your comprehension. Here’s the command:

git config remote.upstream.fetch “+refs/heads/(star):refs/remotes/upstream/(star)” from erpnext and then

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

Hope that helps.

Thanks

Jay

okay. but to reconfirm, am i to run it in only the erpnext directory?

UPDATE: Upgrade completed successfully but only frappe upgraded to v12. erpnext is still on v11

can anyone point out what would be the latest moment when to run the …

switch-to-branch [version]

… command when your instance is on the master branch currently?

not 100% sure if that is still relevant but from switching branches from staging to master las time , but as far as I remember …

switch-to-branch [branch] --upgrade

… would be the ideal command of choice.

Okay, sorry if I am getting too detailed. :slight_smile:

git config remote.upstream.fetch “+refs/heads/(star):refs/remotes/upstream/(star)” from erpnext and then

from frappe-bench directory

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

Hope that helps.

Thanks

Jay

2 Likes

I figured i’d need to do that so i already did. But when i try to migrate i get this error:

frappe.exceptions.DoesNotExistError: DocType Item Manufacturer not found

I essentially gave up, setup a new v12 instance and restored backup and everything is fine. i have tried direct upgrade all day and it doesn’t work

@flexy2ky

Just scroll up a little bit:

Hope it helps.

1 Like

Please clarify if:
production systems which were on master need to change either to version-11 or version-12 and both still are valid versions.

very confusing from the start. Here below:

"Repository Changes
The branches on the ERPNext & Frappe repositories are being renamed as follows:

Old Name New Name
develop version-12
master version-11
hotfix version-11-hotfix
Note: The master branch has been deprecated as of today i.e. 22 July, 2019.

Following are the new branches created:

develop: Version 13
version-12-hotfix: Staging area for version 12 fixes
Please note, all your open PRs have to be rebased to the new branch."

Please also note that there are systems on production.