ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

AttributeError: 'NoneType' object has no attribute 'bank'

bug

#1

I get this Error when making payment from Purchase Invoice doctype

Traceback (most recent call last):
File “/home/administrator/frappe-bench/apps/frappe/frappe/app.py”, line 61, in application
response = frappe.handler.handle()
File “/home/administrator/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/administrator/frappe-bench/apps/frappe/frappe/handler.py”, line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/administrator/frappe-bench/apps/frappe/frappe/init.py”, line 1020, in call
return fn(*args, **newargs)
File “/home/administrator/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py”, line 911, in get_payment_entry
pe.set_bank_account_data()
File “/home/administrator/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py”, line 98, in set_bank_account_data
self.bank = bank_data.bank
AttributeError: ‘NoneType’ object has no attribute ‘bank’


#2

Solved! there was no bank account declared in my Company