Project 10 line 1 column 1 error

I am getting this error "str"obj has no “text” attributes.
Plzz help me with the required solution…


@swastishree10 in the try block, you have mis-spelled the word response while inititating the mail functionality. Correct statement will be:

response = mailer.send_email("Alert", "current temperature sensor value is: " + str(sensor_value))

Do close the query after going through this :slightly_smiling_face:


Now it’s showing this

As in this post I have written that you have used wrong string pattern inside the mailer.send_email. Have you corrected that because it should be
mailer.send_email("Alert, current temperature sensor value is: " + str(sensor_value))

not, mailer.send_email(“Alert”, " current temperature sensor value is: " + str(sensor_value))

Uploading: IMG_20210603_142925.jpg…
now its showing this error

Please share the image of the error again as I can’t see it.


now its showing this error

Please share the updated code again which is causing this error

Ok m giving it…but is there any way to forcely come out from output…I have to again n again power off and on the machine

Use ctrl + c to exit i.e. forcefully terminate the execution

Keep the below part as it was, as send_email sends email as (“Subject”, “Body”)

mailer.send_email(“Alert”, " current temperature sensor value is: ")

Necessary changes,

mailer.send_email(“Alert”, " current temperature sensor value is: "+ str(data[‘value’])

Check if it works

Yes follow the same, you will get no error

Again this error is there same ie column 1 wala error

Send screenshot of error message

I have given in replies plz check

Is this the error @swastishree10

After correcting the spelling you are getting an error!

this one Expecting value: line 1 column1 (char0)

mailer.send_email(“Alert”, " current temperature sensor value is: ",sensor_value)