• <bdo id='k8xMQ'></bdo><ul id='k8xMQ'></ul>

    <small id='k8xMQ'></small><noframes id='k8xMQ'>

    <tfoot id='k8xMQ'></tfoot>

    1. <i id='k8xMQ'><tr id='k8xMQ'><dt id='k8xMQ'><q id='k8xMQ'><span id='k8xMQ'><b id='k8xMQ'><form id='k8xMQ'><ins id='k8xMQ'></ins><ul id='k8xMQ'></ul><sub id='k8xMQ'></sub></form><legend id='k8xMQ'></legend><bdo id='k8xMQ'><pre id='k8xMQ'><center id='k8xMQ'></center></pre></bdo></b><th id='k8xMQ'></th></span></q></dt></tr></i><div id='k8xMQ'><tfoot id='k8xMQ'></tfoot><dl id='k8xMQ'><fieldset id='k8xMQ'></fieldset></dl></div>
    2. <legend id='k8xMQ'><style id='k8xMQ'><dir id='k8xMQ'><q id='k8xMQ'></q></dir></style></legend>

        如何从 tweepy 异步 on_status?

        时间:2023-10-11
            <bdo id='E38h4'></bdo><ul id='E38h4'></ul>

                <tbody id='E38h4'></tbody>
            1. <small id='E38h4'></small><noframes id='E38h4'>

              <i id='E38h4'><tr id='E38h4'><dt id='E38h4'><q id='E38h4'><span id='E38h4'><b id='E38h4'><form id='E38h4'><ins id='E38h4'></ins><ul id='E38h4'></ul><sub id='E38h4'></sub></form><legend id='E38h4'></legend><bdo id='E38h4'><pre id='E38h4'><center id='E38h4'></center></pre></bdo></b><th id='E38h4'></th></span></q></dt></tr></i><div id='E38h4'><tfoot id='E38h4'></tfoot><dl id='E38h4'><fieldset id='E38h4'></fieldset></dl></div>
              <legend id='E38h4'><style id='E38h4'><dir id='E38h4'><q id='E38h4'></q></dir></style></legend>

                <tfoot id='E38h4'></tfoot>
                • 本文介绍了如何从 tweepy 异步 on_status?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我得到的错误是:

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

                  我的 stdOutListener 看起来像这样:

                  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)
                  

                  我知道我需要将 on_status 称为 async'd,但我该怎么做呢?我已经尝试等待 on_status 中的大部分内容

                  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

                  推荐答案

                  Tweepy 还没有 asyncio 支持.为此,请参阅 https://github.com/tweepy/tweepy/issues/732.

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

                  相反,您可以使用 is_async 参数在单独的线程中运行流.请参阅 https://tweepy.readthedocs.io/en/latest/streaming_how_to.html#async-streaming.

                  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.

                  这篇关于如何从 tweepy 异步 on_status?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何捕获 subprocess.call 的输出 下一篇:如何使数据在 discord.py 中以表格形式显示?

                  相关文章

                  最新文章

                • <small id='09CBn'></small><noframes id='09CBn'>

                      • <bdo id='09CBn'></bdo><ul id='09CBn'></ul>

                      <i id='09CBn'><tr id='09CBn'><dt id='09CBn'><q id='09CBn'><span id='09CBn'><b id='09CBn'><form id='09CBn'><ins id='09CBn'></ins><ul id='09CBn'></ul><sub id='09CBn'></sub></form><legend id='09CBn'></legend><bdo id='09CBn'><pre id='09CBn'><center id='09CBn'></center></pre></bdo></b><th id='09CBn'></th></span></q></dt></tr></i><div id='09CBn'><tfoot id='09CBn'></tfoot><dl id='09CBn'><fieldset id='09CBn'></fieldset></dl></div>
                    1. <legend id='09CBn'><style id='09CBn'><dir id='09CBn'><q id='09CBn'></q></dir></style></legend>
                    2. <tfoot id='09CBn'></tfoot>