3

The error I'm getting is:

RuntimeWarning: coroutine 'StdOutListener.on_status' was never awaited
if self.on_status(status) is False:
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

My stdOutListener looks like this:

class StdOutListener(StreamListener):

async def on_status(self, status):
    channel = await bot.get_channel(64970710814)
    await channel.send(status.text)

I understand that I need to get on_status called async'd, but how do I do this? I've tried awaiting most of the things inside on_status

sykezlol
  • 88
  • 9

1 Answers1

1

Tweepy doesn't yet have asyncio support. For that, see https://github.com/tweepy/tweepy/issues/732.

Instead, you can use the is_async parameter to run the stream in a separate thread. See https://tweepy.readthedocs.io/en/latest/streaming_how_to.html#async-streaming.

Harmon758
  • 5,084
  • 3
  • 22
  • 39