Calling index_total_returns throws a JSONDecodeError. The endpoint https://niftyindices.com/Backpage.aspx/getTotalReturnIndexString seems to return non‑JSON (possibly empty or HTML).
Steps to Reproduce:
from nsepython import index_total_returns
symbol = "NIFTY 50"
start_date = "06-Jul-2026"
end_date = "06-Jul-2026"
print(index_total_returns(symbol,start_date,end_date))
Error:
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
Environment:
Windows 11
Python 3.13
nsepython 2.97
Expected:
Function should print total return index values.
Actual:
Fails with JSONDecodeError.
Calling
index_total_returnsthrows aJSONDecodeError. The endpointhttps://niftyindices.com/Backpage.aspx/getTotalReturnIndexStringseems to return non‑JSON (possibly empty or HTML).Steps to Reproduce:
Error:
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 2 (char 1)Environment:
Windows 11
Python 3.13
nsepython 2.97
Expected:
Function should print total return index values.
Actual:
Fails with JSONDecodeError.