[Release] Instructions for updating to/staying on v10/v11

done some of the steps. and fixed some errors with pip version etc.
when i run
bench update --patch

i get this error
Executing erpnext.patches.v11_0.create_salary_structure_assignments 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
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 722, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, 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 1066, 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 895, 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 535, 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 227, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 38, 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/v11_0/create_salary_structure_assignments.py”, line 49, in execute
s.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 283, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 222, in insert
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 876, in run_before_save_methods
self.run_method(“validate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 766, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py”, line 15, in validate
self.validate_dates()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py”, line 23, in validate_dates
frappe.throw(“Salary Structure Assignment for Employee already exists”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 351, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 337, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 310, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Salary Structure Assignment for Employee already exists

Hi, it seems like you’re running outdated or modified code.

  • The run_module_method starts on line 327
  • Work Order does not have name get_permitted_documents

Go to apps/erpnext and verify with git status that there is no modified code.
Also check the output of bench version.

Thank you for reporting. We are working to fix this.

hi snv
thanks for the prompt reply,

here is the output of bench version
erpnext 11.1.2
frappe 11.1.2

I have some changes to my installation, however I have run git stash before I started updating.

@jrubins Your issue is valid. I was replying to @fkardame previously. :slightly_smiling_face:

1 Like

It has been fixed here:

Will be merged into master branch later today.

This has been released. Please run bench update. Thanks for your patience.

git status
On branch master
Your branch is up-to-date with ‘upstream/master’.
nothing to commit, working directory clean

bench version
erpnext 11.1.2
foundation 0.0.1
frappe 10.1.71

I tried to move fro staging branch to master v11 and am getting this error

Traceback (most recent call last):
File “/usr/lib/python3.5/runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.5/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, lin e 97, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, lin e 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py” , line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py” , line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py” , line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py” , line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py” , line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py” , line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/decorato rs.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 227 , in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 53, in mi grate
router.sync_global_search()
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 35 5, in sync_global_search
sync_global_search()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/global_search.py”, li ne 314, in sync_global_search
value = json.loads(frappe.cache().lpop(‘global_search_queue’))
File “/usr/lib/python3.5/json/init.py”, line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not ‘bytes’

kindly help

well, we know the problem now.
you only switched the erpnext branch.
your frappe branch is still on v10.

bench switch-to-branch master frappe --upgrade
bench update --patch

Trying that.
Thanks for your quick reply.

Thanks for reporting.

This has been fixed.
Will be merged soon.

Hi, I updated to rev 11 I think succesfully. This was the output in console:

Updating DocTypes for frappe        : [========================================]
Updating DocTypes for erpnext       : [========================================]
/home/frappe/frappe-bench/env/lib/python2.7/site-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.23) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Please install yarn using below command and try again.
npm install -g yarn

> frappe@ production /home/frappe/frappe-bench/apps/frappe
> FRAPPE_ENV=production node rollup/build.js

module.js:478
    throw err;
    ^

Error: Cannot find module 'rollup'
    at Function.Module._resolveFilename (module.js:476:15)
    at Function.Module._load (module.js:424:25)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/rollup/build.js:4:16)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)

npm ERR! Linux 3.10.0-957.1.3.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "production"
npm ERR! node v6.16.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! frappe@ production: `FRAPPE_ENV=production node rollup/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frappe@ production script 'FRAPPE_ENV=production node rollup/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the frappe package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     FRAPPE_ENV=production node rollup/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs frappe
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls frappe
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/frappe/frappe-bench/apps/frappe/npm-debug.log
--------------------------------------------------------------------------------
Your bench was upgraded to version 11

I don’t know if this is some serious error or I can just ignore it. But now I’m getting other errors in ERP.


Can you help please?

Thank you. I was able to access the desktop/desk after

Thank you develop team! Virtualbox .ova bench update went trough today.

hi Team,

am now getting a new error which is

Migrating jaydcosmetics.co.ke
Traceback (most recent call last):
File “/usr/lib/python3.5/runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.5/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 94, in
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/lib/python3.5/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.5/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 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 222, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 33, in migrate
frappe.model.sync.sync_all(verbose=verbose)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/sync.py”, line 16, in sync_all
block_user(True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 118, in block_user
frappe.db.set_global(’__session_status’, block and ‘stop’ or None)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 719, in set_global
self.set_default(key, val, user)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 727, in set_default
frappe.defaults.set_default(key, val, parent, parenttype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py”, line 109, in set_default
add_default(key, value, parent)
File “/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py”, line 120, in add_default
d.insert(ignore_permissions=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 210, in insert
self._set_defaults()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 585, in _set_defaults
new_doc = frappe.new_doc(self.doctype, as_dict=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 614, in new_doc
return get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py”, line 20, in get_new_doc
frappe.local.new_doc_templates[doctype] = make_new_doc(doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py”, line 41, in make_new_doc
set_user_and_static_default_values(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py”, line 51, in set_user_and_static_default_values
user_permissions = get_user_permissions()
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user_permission/user_permission.py”, line 67, in get_user_permissions
fields=[‘allow’, ‘for_value’], filters=dict(user=user)):
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1177, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1150, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 88, in execute
result = self.build_and_run()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 100, in build_and_run
args = self.prepare_args()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 119, in prepare_args
self.build_conditions()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 288, in build_conditions
self.build_filter_conditions(self.filters, self.conditions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 309, in build_filter_conditions
conditions.append(self.prepare_filter_condition(f))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 380, in prepare_filter_condition
value = ‘"{0}"’.format(frappe.db.escape(value, percent=False))
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 904, in escape
s = text_type(pymysql.escape_string(s), “utf-8”).replace("", "\\")
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/pymysql/converters.py”, line 73, in _escape_unicode
return value.translate(_escape_table)
TypeError: a bytes-like object is required, not ‘list’

this happened when I tried to switch from staging to master as directed above.

kindly help.

Please start a new thread as this one is growing long and your post off topic too thanks!

thanks I will do that now