Error in telegram alert message for temperature sensor

Hi
I am getting following error message while writing a code for telegram alert when temperature exceeds the threshold value.
image .
Following is an code for my program:
1.


2.

Please kindly helpme in order to get rid of these Error.:pray::pray::pray:

hey @ghagaresudhir,
In Send_telegram_message function, go to line 2 the ‘data’ dictionary should be as follows:

data = {"chat_id": confy.telegram_chat_id,"text": message}

The colons shouldn’t be enclosed in " "

PS: Remove the unnecessary comma’s before the ‘confy.telegram_chat_id’ and ‘message’ in the data.

1 Like