久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

    3. <tfoot id='cxezv'></tfoot>

        <bdo id='cxezv'></bdo><ul id='cxezv'></ul>

        discord.py 和 youtube_dl,“讀取錯誤";和“會話

        discord.py and youtube_dl, quot;Read errorquot; and quot;The session has been invalidated for some reasonquot;(discord.py 和 youtube_dl,“讀取錯誤;和“會話因某種原因已失效)
      1. <small id='MDeVt'></small><noframes id='MDeVt'>

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

              <tfoot id='MDeVt'></tfoot>
                <tbody id='MDeVt'></tbody>
                • 本文介紹了discord.py 和 youtube_dl,“讀取錯誤";和“會話因某種原因已失效"的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我在使用 discord.py 和 youtube_dl 時遇到了這個問題,在隊列中播放 YouTube 鏈接給我一個錯誤,似乎滾雪球"進入隊列中的其他歌曲.第一首歌通常播放得很好,但其他歌曲在很短的時間后就會出現這個錯誤.這是錯誤:

                  I have been running into this issue with discord.py and youtube_dl where playing YouTube links in a queue gives me an error that seems to "snowball" into the other songs in the queue. The first song usually plays just fine, but then the rest of the songs give this error after a very short period of time. This is the error:

                  [tls @ 000001e5618bc200] Error in the pull function.
                  [matroska,webm @ 000001e5613f9740] Read error
                  [tls @ 000001e5618bc200] The specified session has been invalidated for some reason.
                  Last message repeated 1 times
                  [really long link] I/O error
                  

                  這是我的 YTDL 源代碼和隊列函數:

                  And this is my code for the YTDL source and the queue function:

                  class YTDLSource(discord.PCMVolumeTransformer):
                      def __init__(self, source, *, data, volume=0.5):
                          super().__init__(source, volume)
                  
                          self.data = data
                  
                          self.title = data.get('title')
                          self.url = data.get('url')
                  
                      @classmethod
                      async def from_url(cls, url, *, loop=None, stream=False):
                          loop = loop or asyncio.get_event_loop()
                          data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))
                  
                          if 'entries' in data:
                              # take first item from a playlist
                              data = data['entries'][0]
                  
                          filename = data['url'] if stream else ytdl.prepare_filename(data)
                          return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)
                  
                  
                  
                  queues = {}
                  
                  class Music(commands.Cog):
                      def __init__(self, bot):
                          self.bot = bot
                  
                      @commands.command()
                      async def q(self, ctx, *, url):
                          channel = discord.utils.get(ctx.guild.voice_channels, name="Melodies of Arts")
                  
                          if ctx.voice_client is None:
                              await channel.connect()
                  
                  
                          def check_queue(error):
                              if(queues[ctx.guild.id] != []):
                                  player = queues[ctx.guild.id].pop(0)
                                  ctx.voice_client.play(player, after=check_queue)     
                  
                          async with ctx.typing():
                              player = await YTDLSource.from_url(url, loop=self.bot.loop, stream=True)
                  
                              if ctx.guild.id in queues:
                                  queues[ctx.guild.id].append(player)
                              else:
                                  queues[ctx.guild.id] = [player]
                  
                              await ctx.send("Video __" + str(player.title) + "__" + " queued at **Position #" + str(len(queues[ctx.guild.id])) + "**", delete_after=15)
                  
                              if(not ctx.voice_client.is_playing()):
                                  ctx.voice_client.play(player, after=check_queue)
                                  await ctx.send('***Now playing:*** __{}__'.format(player.title), delete_after=10)
                  

                  Github 問題頁面建議重新下載 url",但我正在使用 youtube_dl 流式傳輸鏈接,并且我希望盡可能避免下載視頻.無論如何,很多 Github 問題似乎都已經過時了,因此任何與代碼相關的解決方案都不再適用.如果我需要提供更多代碼/信息,請告訴我!

                  A Github issue page recommended to "redownload the url", but I am streaming the the link using youtube_dl, and I would like to avoid downloading the video if possible. A lot of the Github issues seem to be too outdated anyway, so any solutions relating to code do not work anymore. If I need to provide more code/information let me know!

                  推薦答案

                  正如人們常說的,這真的不是你的錯".這通常發生在 YouTube 方面.

                  As people like to say, "It's really not your fault". This usually happens from the YouTube side.

                  看看:Python Youtube ffmpeg 會話已失效

                  另外,請檢查您是否使用 https 進行了調用.YouTube 不再接受 http 連接.

                  Also, check that you called using https. YouTube no longer accepts http connections.

                  這篇關于discord.py 和 youtube_dl,“讀取錯誤";和“會話因某種原因已失效"的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)

                • <tfoot id='9fVnr'></tfoot>
                    <tbody id='9fVnr'></tbody>
                • <legend id='9fVnr'><style id='9fVnr'><dir id='9fVnr'><q id='9fVnr'></q></dir></style></legend>

                          <i id='9fVnr'><tr id='9fVnr'><dt id='9fVnr'><q id='9fVnr'><span id='9fVnr'><b id='9fVnr'><form id='9fVnr'><ins id='9fVnr'></ins><ul id='9fVnr'></ul><sub id='9fVnr'></sub></form><legend id='9fVnr'></legend><bdo id='9fVnr'><pre id='9fVnr'><center id='9fVnr'></center></pre></bdo></b><th id='9fVnr'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='9fVnr'><tfoot id='9fVnr'></tfoot><dl id='9fVnr'><fieldset id='9fVnr'></fieldset></dl></div>

                          • <bdo id='9fVnr'></bdo><ul id='9fVnr'></ul>

                            <small id='9fVnr'></small><noframes id='9fVnr'>

                            主站蜘蛛池模板: 日韩免费视频 | 日日夜夜天天干 | 麻豆视频国产在线观看 | 精品久久久久久久久久久 | 成人高潮片免费视频欧美 | 日韩在线一区二区 | 91精品国产综合久久久密闭 | 亚洲区中文字幕 | 亚洲视频观看 | 国产高清久久久 | 免费在线国产视频 | 日韩精品久久久 | 在线观看www高清视频 | 五月天婷婷丁香 | 成人午夜精品一区二区三区 | 中文字幕在线观 | 国产综合精品一区二区三区 | 91原创视频在线观看 | 一区二区三区国产 | 成人性视频免费网站 | 国内久久 | 亚洲精品一区二区三区中文字幕 | 日本高清在线一区 | 国产日韩在线观看一区 | 国产免费一级一级 | 免费精品国产 | 亚洲免费在线 | 涩涩鲁亚洲精品一区二区 | 国产激情在线看 | 在线观看国产h | 国产精品地址 | 日韩成人免费视频 | 中文字幕av在线一二三区 | h视频在线免费 | 日韩一区二区三区在线观看 | 国产毛片av | 精品无码久久久久久国产 | 欧美日韩免费一区二区三区 | 日韩欧美一级精品久久 | 午夜一区 | 精品久久一区二区 |