Error in code of Room Light Monitoring Project

can anyone please help me with is, the given code is showing error.

Your have missed few lines in your code,

1st error- your line 7 should be del history_data[0:len(history_data)-frame_size] , here you forgot to subtract frame size from history_data.

2nd error-in while loop you forgot to transfer data using json format i.e.
while True:
response = mybolt.analogRead(‘A0’)
data = json.loads(response) this line you have missed
Hope this helps to run your code.

Thank you @saket_anand , now its working