Error in equity_history and equity_history_virgin function

from nsepython import *

series = ‘EQ’
symbol = ‘IGL’

end_date = datetime.datetime.now().strftime("%d-%m-%Y")
end_date = str(end_date)

start_date = (datetime.datetime.now() - datetime.timedelta(days=2)).strftime("%d-%m-%Y")
start_date = str(start_date)

while True:
df = equity_history(symbol,series,start_date,end_date)
print(df)
df = equity_history_virgin(symbol,series,start_date,end_date)
print(df)

Below is the error code i received while running in loop, this error occured two times and program crash. After restarting the problem did not occur again.

Traceback (most recent call last):
File “/home/amol/PycharmProjects/unofficed/aliceblue/goldenratio.py”, line 201, in
unofficed_goldenratio()
File “/home/amol/PycharmProjects/unofficed/aliceblue/goldenratio.py”, line 77, in unofficed_goldenratio
getPrevDayLowHigh()
File “/home/amol/PycharmProjects/unofficed/aliceblue/goldenratio.py”, line 57, in getPrevDayLowHigh
df = equity_history_virgin(symbol,‘EQ’,start_date,end_date)
File “/home/amol/.local/lib/python3.9/site-packages/nsepython/rahu.py”, line 514, in equity_history_virgin
payload = nsefetch(url)
File “/home/amol/.local/lib/python3.9/site-packages/nsepython/rahu.py”, line 38, in nsefetch
output = s.get(payload,headers=headers).json()
File “/home/amol/.local/lib/python3.9/site-packages/requests/models.py”, line 900, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/lib/python3.9/json/init.py”, line 346, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.9/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.9/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

=========================================================

Traceback (most recent call last):
File “/home/amol/PycharmProjects/unofficed/aliceblue/goldenratio.py”, line 203, in
unofficed_goldenratio()
File “/home/amol/PycharmProjects/unofficed/aliceblue/goldenratio.py”, line 79, in unofficed_goldenratio
getPrevDayLowHigh()
File “/home/amol/PycharmProjects/unofficed/aliceblue/goldenratio.py”, line 59, in getPrevDayLowHigh
df = equity_history(symbol,series,start_date,end_date)
File “/home/amol/.local/lib/python3.9/site-packages/nsepython/rahu.py”, line 561, in equity_history
total=total.append(equity_history_virgin(symbol,series,start_date,end_date))
File “/home/amol/.local/lib/python3.9/site-packages/nsepython/rahu.py”, line 514, in equity_history_virgin
payload = nsefetch(url)
File “/home/amol/.local/lib/python3.9/site-packages/nsepython/rahu.py”, line 38, in nsefetch
output = s.get(payload,headers=headers).json()
File “/home/amol/.local/lib/python3.9/site-packages/requests/models.py”, line 900, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/lib/python3.9/json/init.py”, line 346, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.9/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.9/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

=========================================================