Custom app not working after upgrade to 9.10.0

Hello,

my app does not work anymore since updated to frappe/erpnext 9.10.0
the error I get is

TypeError: __init__() got an unexpected keyword argument 'owner'

can someone a hint? thanks!

actual code is there : GitHub - hiousi/erpnext-spp: simplified manufacturing process for erpnext

I believe this was fixed before 9.1.0. Let’s have the full traceback so that we can know where exactly the crash is coming from

happens since 9.1.0 update:

 [ERROR] 2017-10-05 08:51:15,766 | /home/frappe/frappe-bench/apps/frappe/frappe/app.py:
Site: site1.local
Form Dict: {
 "cmd": "frappe.desk.form.load.getdoc",
 "doctype": "Simplified Production Tool",
 "name": "Simplified Production Tool"
}
Request Error
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 57, in application
response = frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle
data = execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 923, in call
return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/load.py", line 32, in getdoc
doc = frappe.get_doc(doctype, name)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 622, in get_doc
return frappe.model.document.get_doc(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 68, in get_doc
return controller(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/spp/spp/simplified_production_process/doctype/simplified_production_tool/simplified_production_tool.py", line 19, in __init__
super(SimplifiedProductionTool, self).__init__(arg1, arg2)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 103, in __init__
self.load_from_db()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 129, in load_from_db
single_doc = frappe.new_doc(self.doctype).as_dict()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 598, 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 38, in make_new_doc
"docstatus": 0
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 622, in get_doc
return frappe.model.document.get_doc(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 68, in get_doc
return controller(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'owner'

after upgrading to frappe v9.1.5 error is still here.
I have no idea what to do with this, error log does not give me a clue.

Can someone help?

reply to myself

I saw @nabinhait removing init() in some controlers code… so I did the same.
Now it works.
(unable to really understand why it needs to be removed)

https://github.com/hiousi/erpnext-spp/commit/01bae4402477c1e619cdf1ec2604b555f1fcfe27

3 Likes