Temperature sensor (email)

What is the error in the below code which shows me an error?

Capturse Please refer following image of code line and error respect.

In second line of your ‘if’ statement remove the comma.
Now it will work.

Use this below code:

import email_conf
from boltiot import Email, Bolt
import json, time

minimum_limit = 300 #the minimum threshold of light value
maximum_limit = 600 #the maximum threshold of light value

mybolt = Bolt(email_conf.API_KEY, email_conf.DEVICE_ID)
mailer = Email(email_conf.MAILGUN_API_KEY, email_conf.SANDBOX_URL, email_conf.SENDER_EMAIL, email_conf.RECIPIENT_EMAIL)

while True:
print (“Reading sensor value”)
response = mybolt.analogRead(‘A0’)
data = json.loads(response)
print ("Sensor value is: " + str(data[‘value’]))
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))
response_text = json.loads(response.text)
print("Response received from Mailgun is: " + str(response_text[‘message’]))
except Exception as e:
print (“Error occured: Below are the details”)
print (e)

Bro, Check your Code and remove that space between '+' and 'str'

and write it like
response = mailer.send_email(“Alert”, "The Current temperature sensor value is " +str(sensor_value))

still is showstemp
please help to correct it

Such message was also show to me then I checked again and found that my key was wrong.
So please check your all your keys and id’s.

go and check whether your email_conf.py file setup is ok according to mailgun account or not,
for complete setup visit

Which coding language is this ? Herbert ?? can you post some material or pdf or GitHub repository to learn this due to financial crisis I can’t able to enroll in bolt iot course please help me. Due to lockdown my business got doomed