I ran bench migrate
a few times and these errors cleared up and I was able to access the desk and website.
after migrate :
Updating customizations for Supplier Type
Traceback (most recent call last):
File “/usr/local/lib/python3.7/runpy.py”, line 193, in _run_module_as_main
“main”, mod_spec)
File “/usr/local/lib/python3.7/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/sagar/Documents/workspace/v11/11-bench/env/lib/python3.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/sagar/Documents/workspace/v11/11-bench/env/lib/python3.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/sagar/Documents/workspace/v11/11-bench/env/lib/python3.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/sagar/Documents/workspace/v11/11-bench/env/lib/python3.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/sagar/Documents/workspace/v11/11-bench/env/lib/python3.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/sagar/Documents/workspace/v11/11-bench/env/lib/python3.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/sagar/Documents/workspace/v11/11-bench/env/lib/python3.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/commands/init.py”, line 25, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/commands/site.py”, line 227, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/migrate.py”, line 44, in migrate
sync_customizations()
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/modules/utils.py”, line 93, in sync_customizations
sync_customizations_for_doctype(data, folder)
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/modules/utils.py”, line 132, in sync_customizations_for_doctype
validate_fields_for_doctype(doctype)
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 468, in validate_fields_for_doctype
doc = frappe.get_doc(“DocType”, doctype)
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/init.py”, line 715, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/model/document.py”, line 69, in get_doc
return controller(*args, **kwargs)
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/model/document.py”, line 104, in init
self.load_from_db()
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/model/document.py”, line 141, in load_from_db
frappe.throw((“{0} {1} not found”).format((self.doctype), self.name), frappe.DoesNotExistError)
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/init.py”, line 345, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/init.py”, line 331, in msgprint
_raise_exception()
File “/home/sagar/Documents/workspace/v11/11-bench/apps/frappe/frappe/init.py”, line 304, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: DocType Supplier Type not found
This is valid. Supplier type is no longer a thing. You’ll need to remove it from fixtures.
I got resolved by simply run the bench command:
bench --site <site name> clear-cache
Backing up sites…
Patching sites…
Migrating eo.9t9it.com
Executing erpnext.patches.v11_0.rename_production_order_to_work_order in eo.9t9it.com (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 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/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 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 30, 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/rename_production_order_to_work_order.py”, line 11, in execute
frappe.reload_doc(‘manufacturing’, ‘doctype’, ‘work_order’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 695, in reload_doc
return frappe.modules.reload_doc(module, dt, dn, force=force, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 155, in reload_doc
return import_files(module, dt, dn, force=force, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 19, in import_files
reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 24, in import_file
ret = import_file_by_path(path, force, pre_process=pre_process, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 58, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 132, in import_doc
doc.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 248, in insert
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 889, in run_post_save_methods
self.run_method(“on_update”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 757, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1026, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1009, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 751, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 238, in on_update
self.run_module_method(“on_doctype_update”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 302, in run_module_method
module = load_doctype_module(self.name, self.module)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 187, in load_doctype_module
raise ImportError(‘Module import failed for {0} ({1})’.format(doctype, module_name + ’ Error: ’ + str(e)))
ImportError: Module import failed for Work Order (erpnext.manufacturing.doctype.work_order.work_order Error: cannot import name get_permitted_documents)
never used manufacturing in this test server.
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.
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.
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.
https://discuss.frappe.io/t/unknown-column-tabpayment-entry-employee/45078
Can you help please?
Thank you. I was able to access the desktop/desk after