Answer the question
In order to leave comments, you need to log in
How to fix RuntimeWarning: Enable tracemalloc to get the object allocation traceback?
Throws error
RuntimeWarning: coroutine 'MessageMethods.send_message' was never awaited
client.send_message('me', 'Hello! Talking to you from Telethon')
RuntimeWarning: Enable tracemalloc to get the object allocation
traceback
import os
import asyncio
import sys
import time
import socks
from telethon import TelegramClient, events, utils
session = os.environ.get('TG_SESSION', 'printer')
api_id =
api_hash = ''
proxy = socks.SOCKS5, '', 1080
# Create and start the client so we can make requests (we don't here)
client = TelegramClient(session, api_id, api_hash, proxy=proxy).start()
client.send_message('me', 'Hello! Talking to you from Telethon')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question