Stock Ageing Report - TypeError: ‘<’ not supported between instances of ‘int’ and ‘str’

When open Stock Aging Report this error occurred… ANY HELP PLEASE!
stock

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 61, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1054, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 527, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/query_report.py”, line 186, in run
result = generate_report_result(report, filters, user)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/query_report.py”, line 68, in generate_report_result
res = report.execute_script_report(filters)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/report.py”, line 104, in execute_script_report
res = self.execute_module(filters)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/report.py”, line 121, in execute_module
return frappe.get_attr(method_name)(frappe._dict(filters))
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/report/stock_ageing/stock_ageing.py”, line 14, in execute
item_details = get_fifo_queue(filters)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/report/stock_ageing/stock_ageing.py”, line 181, in get_fifo_queue
if 0 < batch[0] <= qty_to_pop:
TypeError: ‘<’ not supported between instances of ‘int’ and ‘str’

Thanks for reporting this - stay tuned pending this review https://github.com/frappe/erpnext/pull/22206

A fix has been merged to version-12-hotfix

To apply and test that change please run bench update to your instance.

Thanks again for reporting this…

Thanks a lot for your time and support @clarkej
But after solving the error another error occurred


request.js:355 Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 61, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1054, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 527, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/query_report.py”, line 186, in run
result = generate_report_result(report, filters, user)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/query_report.py”, line 68, in generate_report_result
res = report.execute_script_report(filters)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/report.py”, line 104, in execute_script_report
res = self.execute_module(filters)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/report.py”, line 121, in execute_module
return frappe.get_attr(method_name)(frappe._dict(filters))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1045, in get_attr
return getattr(get_module(modulename), methodname)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 826, in get_module
return importlib.import_module(modulename)
File “/home/frappe/frappe-bench/env/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 674, in exec_module
File “”, line 781, in get_code
File “”, line 741, in source_to_code
File “”, line 219, in _call_with_frames_removed
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/report/stock_ageing/stock_ageing.py”, line 188
flt(batch[0]) -= qty_to_pop
^
SyntaxError: can’t assign to function call

Thanks for the followup - this subsequent PR submitted https://github.com/frappe/erpnext/pull/22430

This problem has yet to be resolved. We continue to receive this error, which prevents us from retrieving data for charts of Dashboard. I hope they can resolve this as soon as possible.