Code error in SMS system

I found an error in python code for json library. How change the class for json ? From class ‘dict’ to ‘str’
My error is below:

You just forget some line in the code to taking response form twilio:
if sensor_value > maximum_limit or sensor_value < minimum_limit:
print(“Making request to Twilio to send a SMS”)
response = sms.send_sms("The Current temperature sensor value is " +str(sensor_value))
print("Response received from Twilio is: " + str(response))
print(“Status of SMS at Twilio is :” + str(response.status))
except Exception as e:
print (“Error occured: Below are the details”)
print (e)

Apply this code and you get the result.