Accounts lost when updating to v5


I have just been able to update to v5, but now I am having several issues.

One of them is that the accounts for Customers that ERPNext created automatically under Accounts Receivable in my chart of accounts are not there anymore.

Beside this, when I browse the chart of accounts and click on “View Ledger” for the Debtors account, that is the only one under Accounts Receivable, I get the following error:

    Server Error: Please check your server logs or contact tech support.   Traceback (innermost last):
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/", line 51, in application
    response = frappe.handler.handle()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/", line 62, in handle
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/", line 85, in execute_cmd
    ret =, **frappe.form_dict)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/", line 711, in call
    return fn(*args, **newargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/desk/", line 87, in run
    columns, result = frappe.get_attr(method_name)(frappe._dict(filters))
  File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/accounts/report/general_ledger/", line 18, in execute
    res = get_result(filters, account_details)
  File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/accounts/report/general_ledger/", line 44, in get_result
    data = get_data_with_opening_closing(filters, account_details, gl_entries)
  File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/accounts/report/general_ledger/", line 91, in get_data_with_opening_closing
    opening, total_debit, total_credit, gle_map = get_accountwise_gle(filters, gl_entries, gle_map)
  File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/accounts/report/general_ledger/", line 140, in get_accountwise_gle
    if filters.get("account") and (gle.posting_date TypeError: can't compare to unicode

Many thanks in advance for your help

Fixed the issue.
And in v5, we have do not maintain individual accounting ledger for customers and suppliers. Instead we have added “Party” field in all accounting transaction, so customer and supplier are directly linked to the accounting entries.

Hi Nabinhait,

Many thanks for that!

I am going to restore to v4 and update again.

Thanks and kind regards from Spain,