Update failed with frappe.modules.patch_handler.PatchError: erpnext.patches.v4_0.new_address_templat

84 views
Skip to first unread message

Phinitnan Chanasabaeng

unread,
Jun 6, 2014, 12:19:03 AM6/6/14
to erpnext-dev...@googlegroups.com
Hello,

I'm trying to update erpnext with update.sh but it was failed with the following error log. Could this be a bug and how can I handle it?

Running latest for fozilex
--------------------------------------------------
Executing erpnext.patches.v4_0.new_address_template in fozilex (fozilex)
Traceback (innermost last):
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 66, in execute_patch
    frappe.get_attr(patchmodule + ".execute")()
  File "/home/fozilex/frappe-bench/apps/erpnext/erpnext/patches/v4_0/new_address_template.py", line 5, in execute
    d = frappe.new_doc("Address Template")
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/__init__.py", line 329, in new_doc
    return get_new_doc(doctype, parent_doc, parentfield)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/model/create_new.py", line 35, in get_new_doc
    if (d.fieldtype=="Link") and d.ignore_user_permissions != 1 and (d.options in user_permissions)\
 AttributeError: 'BaseDocument' object has no attribute 'ignore_user_permissions'

erpnext.patches.v4_0.new_address_template: failed: STOPPED
Traceback (most recent call last):
  File "/home/fozilex/frappe-bench/env/bin/frappe", line 9, in <module>
    load_entry_point('frappe==4.0.0', 'console_scripts', 'frappe')()
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/cli.py", line 39, in main
    return run(fn, args)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/cli.py", line 80, in run
    out = globals().get(fn)(**args)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/cli.py", line 64, in new_fn
    return fn(*args, **new_kwargs)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/cli.py", line 416, in latest
    frappe.modules.patch_handler.run_all()
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 27, in run_all
    raise PatchError(patch)
frappe.modules.patch_handler.PatchError: erpnext.patches.v4_0.new_address_template


Rushabh Mehta

unread,
Jun 6, 2014, 12:21:21 AM6/6/14
to erpnext-dev...@googlegroups.com
Seems like an issue based on the new permission system - let me push a hotfix


--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/376092d2-cc2e-4c1e-b37b-997e9df239e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rushabh Mehta

unread,
Jun 6, 2014, 12:24:39 AM6/6/14
to erpnext-dev...@googlegroups.com

Phinitnan Chanasabaeng

unread,
Jun 6, 2014, 12:28:24 AM6/6/14
to erpnext-dev...@googlegroups.com
Thank you for your help. I'll try to update again in a few hours and report back.

Phinitnan Chanasabaeng

unread,
Jun 6, 2014, 12:32:13 AM6/6/14
to erpnext-dev...@googlegroups.com
Unfortunately, another error.


Running latest for fozilex
--------------------------------------------------
Traceback (most recent call last):
  File "/home/fozilex/frappe-bench/env/bin/frappe", line 9, in <module>
    load_entry_point('frappe==4.0.0', 'console_scripts', 'frappe')()
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/cli.py", line 39, in main
    return run(fn, args)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/cli.py", line 80, in run
    out = globals().get(fn)(**args)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/cli.py", line 64, in new_fn
    return fn(*args, **new_kwargs)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/cli.py", line 418, in latest
    frappe.model.sync.sync_all(verbose=verbose)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/model/sync.py", line 16, in sync_all
    sync_for(app, force, verbose=verbose)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/model/sync.py", line 22, in sync_for
    walk_and_sync(folder, force, sync_everything, verbose=verbose)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/model/sync.py", line 51, in walk_and_sync
    if import_file_by_path(os.path.join(path, f), force=force) and verbose:
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 50, in import_file_by_path
    import_doc(doc, force=force)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 110, in import_doc
    doc.insert()
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/model/document.py", line 140, in insert
    self.run_post_save_methods()
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/model/document.py", line 403, in run_post_save_methods
    self.run_method("on_update")
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/model/document.py", line 375, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/model/document.py", line 452, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/model/document.py", line 435, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/model/document.py", line 373, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 94, in on_update
    module = load_doctype_module(self.name, self.module)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/modules/__init__.py", line 50, in load_doctype_module
    return frappe.get_module(get_module_name(doctype, module, prefix))
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/__init__.py", line 372, in get_module
    return importlib.import_module(modulename)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/core/doctype/communication/communication.py", line 11, in <module>
    from frappe.utils.email_lib.email_body import get_email
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/utils/email_lib/__init__.py", line 9, in <module>
    from frappe.utils.email_lib.smtp import send
  File "/home/fozilex/frappe-bench/apps/frappe/frappe/utils/email_lib/smtp.py", line 7, in <module>
    import smtplib
  File "/usr/lib/python2.7/smtplib.py", line 48, in <module>
    import hmac
  File "/usr/lib/python2.7/hmac.py", line 8, in <module>
    from operator import _compare_digest as compare_digest
ImportError: cannot import name _compare_digest
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.

Pratik Vyas

unread,
Jun 6, 2014, 1:00:56 AM6/6/14
to erpnext-dev...@googlegroups.com
Looks like this,
https://www.mail-archive.com/debian-b...@lists.debian.org/msg1224452.html

Are you using Debian? If so, which version?

Thanks,
--
Pratik
erpnext

Phinitnan Chanasabaeng

unread,
Jun 6, 2014, 8:36:05 AM6/6/14
to erpnext-dev...@googlegroups.com
Thank you for your help. Everything is working now after update the virtuaenv.
Reply all
Reply to author
Forward
0 new messages