Keep getting the below error despite properly indenting my code blocks

I keep getting this error everytime i have checked my indentation they are ok.

Traceback (innermost last):
File “/home/princek/frappe-bench/apps/frappe/frappe/app.py”, line 67, in application
response = frappe.handler.handle()
File “/home/princek/frappe-bench/apps/frappe/frappe/handler.py”, line 74, in handle
execute_cmd(cmd)
File “/home/princek/frappe-bench/apps/frappe/frappe/handler.py”, line 99, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/princek/frappe-bench/apps/frappe/frappe/init.py”, line 758, in call
return fn(*args, **newargs)
File “/home/princek/frappe-bench/apps/frappe/frappe/desk/query_report.py”, line 88, in run
columns, result = frappe.get_attr(method_name)(frappe._dict(filters))
File “/home/princek/frappe-bench/apps/frappe/frappe/init.py”, line 741, in get_attr
return getattr(get_module(modulename), methodname)
File “/home/princek/frappe-bench/apps/frappe/frappe/init.py”, line 571, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
File “/home/princek/frappe-bench/apps/erpnext/erpnext/accounts/report/balance_sheet/balance_sheet.py”, line 223
has_value = True
^
IndentationError: expected an indented block

I also faced this issue sometime, but after resetting the indentation then it working fine. So set this code at the starting of line and again set the indentation to this code, i hope it will work.

1 Like