Project 10:- Error:- Expecting value: line 1 column 1 (char 0)

The screenshot of my code. How do I resolve this?

The error screenshotScreenshot 2021-06-04 160133

Head to this thread. All your possible solutions, you will find there.

Remove the the below line from your code

response_text = json.loads(response.text)
print("Response received from Mailgun is: " + str(response_text['message']))

and directly print the response without doing json.loads()

print ("Mailgun response is " + response.text)

Another method - Put this on the email part

response_email = mailer.send_email (ā€œAlertā€, " current temperature sensor value is: "+ str(data[ā€˜valueā€™])
response_text = json.loads( response_email .text)
print("Response received from Mailgun is: " + str(response_text[ā€˜messageā€™]))

Iā€™m not receiving the mail. I followed the directions you said in the thread you mentioned but still not getting emails

while True:
print (ā€œReading sensor valueā€)
response = mybolt.analogRead(ā€˜A0ā€™)
data = json.loads(response)
print ("Sensor value is: " + str(data[ā€˜valueā€™]))
try:
sensor_value = int(data[ā€˜valueā€™])
if sensor_value > maximum_limit or sensor_value < minimum_limit:
print(ā€œMaking request to Mailgun to send an emailā€)
response = mailer.send_email(ā€œAlertā€, "The Current temperature sensor value is " +str(sensor_value))
print ("Mailgun response is " + response.text)
except Exception as e:
print (ā€œError occured: Below are the detailsā€)
print (e)
time.sleep(10)

CHANGE YOUR CODE WITH THIS AND YOUR ISSUE WILL BE SOLVED

this is my code but itā€™s still not working

response = mailer.send_email(ā€œAlertā€, "The Current temperature sensor value is " +str(sensor_value))
print ("Mailgun response is " + response.text)

replace the above line with yours

this will directly print the response without doing json.loads()

Your code is working fine without any error right? Tell me about that first.

Yes the code is working
Screenshot 2021-06-04 215449

Ok great ! Have you verified your recipient email on mailgun.com?
I want you to stick with me here, I will help you through it as quickly as possible.

Yes I have verified my email

Recipient Email. Not asking about mailgun account. Go through this post, and check if you have VERIFIED your recipient mail.

Yes I have verified the email like that

Great. Check your spam/junk folder of your email.

Spam is empty and no new email

Does your mailgun dashboard look something like this?
0/0 delivererd ?

yes it looks like that

Run the code, fulfill the condition and send a screenshot here.