Skip to content

Instantly share code, notes, and snippets.

@scmmishra
Created May 14, 2019 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scmmishra/3b6a0ff549c5e39cbb9def22ed46ed7f to your computer and use it in GitHub Desktop.
Save scmmishra/3b6a0ff549c5e39cbb9def22ed46ed7f to your computer and use it in GitHub Desktop.
Executing frappe.patches.v11_0.create_contact_for_user in test_site (test_frappe)
Traceback (most recent call last):
File "/opt/python/2.7.14/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/opt/python/2.7.14/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/travis/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
main()
File "/home/travis/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/travis/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/travis/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/travis/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/travis/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/travis/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/travis/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/travis/frappe-bench/env/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/travis/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/travis/frappe-bench/apps/frappe/frappe/commands/site.py", line 228, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File "/home/travis/frappe-bench/apps/frappe/frappe/migrate.py", line 48, in migrate
frappe.modules.patch_handler.run_all()
File "/home/travis/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all
if not run_single(patchmodule = patch):
File "/home/travis/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File "/home/travis/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + ".execute")()
File "/home/travis/frappe-bench/apps/frappe/frappe/patches/v11_0/create_contact_for_user.py", line 16, in execute
create_contact(user, ignore_links=True, ignore_mandatory=True)
File "/home/travis/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 1070, in create_contact
}).insert(ignore_permissions=True, ignore_links=ignore_links, ignore_mandatory=ignore_mandatory)
File "/home/travis/frappe-bench/apps/frappe/frappe/model/document.py", line 217, in insert
self._set_defaults()
File "/home/travis/frappe-bench/apps/frappe/frappe/model/document.py", line 612, in _set_defaults
new_doc = frappe.new_doc(df.options, as_dict=True)
File "/home/travis/frappe-bench/apps/frappe/frappe/__init__.py", line 658, in new_doc
return get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
File "/home/travis/frappe-bench/apps/frappe/frappe/model/create_new.py", line 21, in get_new_doc
frappe.local.new_doc_templates[doctype] = make_new_doc(doctype)
File "/home/travis/frappe-bench/apps/frappe/frappe/model/create_new.py", line 39, in make_new_doc
"docstatus": 0
File "/home/travis/frappe-bench/apps/frappe/frappe/__init__.py", line 724, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File "/home/travis/frappe-bench/apps/frappe/frappe/model/document.py", line 69, in get_doc
return controller(*args, **kwargs)
File "/home/travis/frappe-bench/apps/frappe/frappe/model/document.py", line 114, in __init__
self.init_valid_columns()
File "/home/travis/frappe-bench/apps/frappe/frappe/model/base_document.py", line 247, in init_valid_columns
for key in self.get_valid_columns():
File "/home/travis/frappe-bench/apps/frappe/frappe/model/base_document.py", line 257, in get_valid_columns
valid = self.meta.get_valid_columns()
File "/home/travis/frappe-bench/apps/frappe/frappe/model/base_document.py", line 69, in meta
self._meta = frappe.get_meta(self.doctype)
File "/home/travis/frappe-bench/apps/frappe/frappe/__init__.py", line 749, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File "/home/travis/frappe-bench/apps/frappe/frappe/model/meta.py", line 37, in get_meta
meta = Meta(doctype)
File "/home/travis/frappe-bench/apps/frappe/frappe/model/meta.py", line 84, in __init__
super(Meta, self).__init__("DocType", doctype)
File "/home/travis/frappe-bench/apps/frappe/frappe/model/document.py", line 104, in __init__
self.load_from_db()
File "/home/travis/frappe-bench/apps/frappe/frappe/model/meta.py", line 89, in load_from_db
super(Meta, self).load_from_db()
File "/home/travis/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/travis/frappe-bench/apps/frappe/frappe/__init__.py", line 351, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red')
File "/home/travis/frappe-bench/apps/frappe/frappe/__init__.py", line 337, in msgprint
_raise_exception()
File "/home/travis/frappe-bench/apps/frappe/frappe/__init__.py", line 310, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: DocType Dynamic Link not found
The command "bench migrate" exited with 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment