Erpnex v12.11.1 Report Error

Hi everybody, I’m getting this “TypeError: range() integer end argument expected, got float.” after updating to v12.11.1.

Trace error: Navigate to Accouting under “Financial Statements”, Profit and Loss Statement, Balance Sheet and Cash Flow produces the error above.

An urgent help here would be much appreciated. Regards


I am also receiving same error. It seems the error was corrected for frappe develop but not for production.


I have been able to solve this problem by upgrading my python environment to python3. You can upgrade by following the instructions here. Please kindly make sure that all custom app installed support python3 before upgrading as this can cause issues. I hope someone finds this helpful

The problem is mainly because of the float value in range function. Python range function does not accept floating point numbers as arguments, so you must use integers.

Range(start value, end value, step)

If it’s old code, it would have worked on Python 2. Integer division in Python 2 produces another integer. In Python 3 it produces a float.