TypeError: 'NoneType' object is not iterable for subcontracted stock receipt

While subcontracted product receipt stock entry am getting TypeError: ‘NoneType’ object is not iterable.

Till issue of material for subcontracted item it works fine.

Am using Version 14.

Did go through some conversation on the same issue, But could not resolve.

Please share solution. Thank you

Hi, can you post the trackback from the error log.

Please find below. Thanks.

Traceback
/home/frappe/frappe-bench/apps/frappe/frappe/app.py: 69

67
68 elif request.path.startswith(“/api/”):
69 response = frappe.api.handle()
70
71 elif request.path.startswith(“/backups”):
/home/frappe/frappe-bench/apps/frappe/frappe/api.py: 54

52 if call == “method”:
53 frappe.local.form_dict.cmd = doctype
54 return frappe.handler.handle()
55
56 elif call == “resource”:
/home/frappe/frappe-bench/apps/frappe/frappe/handler.py: 45

43
44 if cmd != “login”:
45 data = execute_cmd(cmd)
46
47 # data can be an empty string or list which are valid responses
/home/frappe/frappe-bench/apps/frappe/frappe/handler.py: 83

81 is_valid_http_method(method)
82
83 return frappe.call(method, **frappe.form_dict)
84
85
/home/frappe/frappe-bench/apps/frappe/frappe/init.py: 1599

1597 newargs = get_newargs(fn, kwargs)
1598
1599 return fn(*args, **newargs)
1600
1601
/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py: 22

20 doc.submit()
21 else:
22 doc.save()
23
24 # update recent documents
/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py: 301

299 def save(self, *args, **kwargs):
300 “”“Wrapper for _save”“”
301 return self._save(*args, **kwargs)
302
303 def _save(self, ignore_permissions=None, ignore_version=None) → “Document”:
/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py: 323

321
322 if self.get(“__islocal”) or not self.get(“name”):
323 return self.insert()
324
325 self.check_permission(“write”, “save”)
/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py: 255

253
254 self.flags.in_insert = True
255 self.run_before_save_methods()
256 self._validate()
257 self.set_docstatus()
/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py: 1056

1054
1055 if self._action == “save”:
1056 self.run_method(“validate”)
1057 self.run_method(“before_save”)
1058 elif self._action == “submit”:
/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py: 928

926
927 fn.name = str(method)
928 out = Document.hook(fn)(self, *args, **kwargs)
929
930 self.run_notifications(method)
/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py: 1268

1266
1267 composed = compose(f, *hooks)
1268 return composed(self, method, *args, **kwargs)
1269
1270 return composer
/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py: 1250

1248 def compose(fn, *hooks):
1249 def runner(self, method, *args, **kwargs):
1250 add_to_return_value(self, fn(self, *args, **kwargs))
1251 for f in hooks:
1252 add_to_return_value(self, f(self, method, *args, **kwargs))
/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py: 925

923 # If method found in dict, expect it to be callable
924 if method in self.dict or callable(method_object):
925 return method_object(*args, **kwargs)
926
927 fn.name = str(method)
/home/frappe/frappe-bench/apps/erpnext/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py: 63

61 def validate(self):
62 super(SubcontractingReceipt, self).validate()
63 self.set_missing_values()
64 self.validate_posting_time()
65 self.validate_rejected_warehouse()
/home/frappe/frappe-bench/apps/erpnext/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py: 106

104 @frappe.whitelist()
105 def set_missing_values(self):
106 self.set_missing_values_in_additional_costs()
107 self.set_missing_values_in_supplied_items()
108 self.set_missing_values_in_items()
/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/subcontracting_controller.py: 724

722
723 def set_missing_values_in_additional_costs(self):
724 self.total_additional_costs = sum(flt(item.amount) for item in self.get(“additional_costs”))
725
726 if self.total_additional_costs:
A