0
import telegram

bot_Token = " .... "

bot = telegram.Bot( token = bot_Token )

bot.sendMessage(chat_id = " .... ", text = 'hello~' )

This code operate well in jupyter notebook.

But don't operate in GCP ( linux ).

Terminal show "RuntimeWarning: coroutine 'Bot.send_message' was never awaited bot.sendMessage(chat_id = " .... ", text = 'hello~' ) RuntimeWarning: Enable tracemalloc to get the object allocation traceback" error.

I tried to study what is coroutine and asyncio. But i don't know how to solve this problem.

Thank you for read.

Junha
  • 1
  • 1

0 Answers0