K
K
kos94ok2019-03-08 09:26:26
Python
kos94ok, 2019-03-08 09:26:26

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')

How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arthur Mustafin, 2019-05-01
@virtual_hack2root

this warning is due to process.wait()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question