if(temp < 10):
answer += "Outside is so cold, please dress warmly! Don't forget the gloves and scarf"
elif(temp < 20):
answer += "Now is chilly, dress for the weather!"
else:
answer += "Warm, dress what you want! ;)"
bot.send_message(message.chat.id, answer)
bot.polling(none_stop = True)
______
C:\Users\admin\Desktop\Yernur Study\Python>python Main.py
2022-02-01 03:14:39,452 (util.py:65 WorkerThread2) ERROR - TeleBot: "TypeError occurred, args=("'str' object is not callable",)
Traceback (most recent call last):
File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\util.py", line 59, in run
task(*args, **kwargs)
File "C:\Users\admin\Desktop\Yernur Study\Python\Main.py", line 22, in send_echo
answer = "In " + message.text + " now: " + w.detailed_status()
TypeError: 'str' object is not callable
"
Traceback (most recent call last):
File "C:\Users\admin\Desktop\Yernur Study\Python\Main.py", line 35, in
bot.polling(none_stop = True)
File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\__init.py", line 389, in polling
self.__threaded_polling(none_stop, interval, timeout)
File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\__init__.py", line 413, in __threaded_polling
self.worker_pool.raise_exceptions()
File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\util.py", line 108, in raise_exceptions
six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\six.py", line 719, in reraise
raise value
File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\telebot\util.py", line 59, in run
task(*args, **kwargs)
File "C:\Users\admin\Desktop\Yernur Study\Python\Main.py", line 22, in send_echo
answer = "In " + message.text + " now: " + w.detailed_status()