Error in code of,Sending an SMS when Temperature Crosses Threshold!

Hi Sir,

found indentation errors in the code, the actual code mentioned in the course is as below:
import conf
from boltiot import Sms, Bolt
import json, time

minimum_limit = 300
maximum_limit = 600

mybolt = Bolt(conf.API_KEY, conf.DEVICE_ID)
sms = Sms(conf.SSID, conf.AUTH_TOKEN, conf.TO_NUMBER, conf.FROM_NUMBER)

while True:
response = mybolt.analogRead(‘A0’)
data = json.loads(response)
print (data[‘value’])
sensor_value = int(data[‘value’])
print (sensor_value)
if sensor_value > maximum_limit or sensor_value < minimum_limit:
response = sms.send_sms("The Current temperature sensor value is " +str(sensor_value))
except Exception as e:
print (“Error”,e)

so the code which i have writen in VMware,im getting this error as shown in below image:

Please do guide me, also wanted to rectify if the credentials put are proper like API_key n remaining.

@pednekarruchika I believe this is the same error as I had mentioned in your previous post.

Hi ,

How do you paste your code in VMware Workstation 12 Player after editing in other text editor ?

The status of messages is shown as undelivered on twilo while in my terminal the status of messages is shown as queued anyone know how to solve this problem @rahul.singh1