Error on stock balance report

following error pops up while viewing stock

Traceback (most recent call last):
File “/home/erpdev/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/home/erpdev/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/erpdev/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/erpdev/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/home/erpdev/frappe-bench/apps/frappe/frappe/desk/query_report.py”, line 96, in run
res = frappe.get_attr(method_name)(frappe._dict(filters))
File “/home/erpdev/frappe-bench/apps/erpnext/erpnext/stock/report/stock_balance/stock_balance.py”, line 29, in execute
report_data = [item, item_map[item][“item_name”],
KeyError: u’Hight Power Braided Super PE 135M’

The item mentioned has been deleted from the item table.
Do you need a more detailed explanation of when this error started appearing?

Please help.

Thanks

The steps taken after which this error appeared are.

  1. by mistakenly merged a variant with a Template (should have a check to prevent this)
  2. could not delete the merged item or its sales or stock entry.
  3. had to force delete the item by removing it from database by query .
    4.deleted stock entry by query
    5.also deleted stock entry detail and stock entry ledger for that items from sql.

now i cant access the balance report with this error .

what are the corrective steps to be taken ?

regards,

Thanks for this informative content.