Skip to content

IndexError: list index out of range when trying voiceObject.play(source) #10371

@rainwater-83c

Description

@rainwater-83c

Summary

The title says it

Reproduction Steps

the code for playing the url

        voice = ctx.guild.voice_client
        source = await discord.FFmpegOpusAudio.from_probe(url, **FFMPEG_OPTIONS)
        voice.play(source, after=None)

Minimal Reproducible Code

        voice = ctx.guild.voice_client
        source = await discord.FFmpegOpusAudio.from_probe(url, **FFMPEG_OPTIONS)
        voice.play(source, after=None)

Expected Results

For the music to start playing

Actual Results

[2025-12-30 15:56:48,098] {player.py:599} ERROR - Probe 'native' using 'ffmpeg' failed, trying fallback
Traceback (most recent call last):
  File "C:\Users\rain\.virtualenvs\TWM-LveKoQPz\Lib\site-packages\discord\player.py", line 591, in probe
    codec, bitrate = await loop.run_in_executor(None, lambda: probefunc(source, executable))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rain\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rain\.virtualenvs\TWM-LveKoQPz\Lib\site-packages\discord\player.py", line 591, in <lambda>
    codec, bitrate = await loop.run_in_executor(None, lambda: probefunc(source, executable))
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rain\.virtualenvs\TWM-LveKoQPz\Lib\site-packages\discord\player.py", line 622, in _probe_codec_native
    streamdata = data['streams'][0]
                 ~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

Intents

all

System Information

  • Python v3.11.0-final
  • discord.py v2.6.4-final
  • aiohttp v3.13.2
  • system info: Windows 10 10.0.19045

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    unconfirmed bugA bug report that needs triaging

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions