Discord bot python: discord.errors.ClientException: ffmpeg was not found The Next CEO of Stack OverflowDiscord Bot Python ffmpeg errorDiscord bot: Fix ‘FFMPEG not found’Discord FFmpeg not foundCalling an external command in PythonWhat are metaclasses in Python?Is there a way to run Python on Android?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?How to get the current time in PythonHow can I make a time delay in Python?Does Python have a string 'contains' substring method?

When airplanes disconnect from a tanker during air to air refueling, why do they bank so sharply to the right?

Return the Closest Prime Number

Why is there a PLL in CPU?

How to safely derail a train during transit?

Why does C# sound extremely flat when saxophone is tuned to G?

Why do professional authors make "consistency" mistakes? And how to avoid them?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Too much space between section and text in a twocolumn document

WOW air has ceased operation, can I get my tickets refunded?

What does "Its cash flow is deeply negative" mean?

Why were Madagascar and New Zealand discovered so late?

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

What is meant by a M next to a roman numeral?

Can a single photon have an energy density?

Go Pregnant or Go Home

How do I construct this japanese bowl?

Opposite of a diet

Is the concept of a "numerable" fiber bundle really useful or an empty generalization?

How do scammers retract money, while you can’t?

Term for the "extreme-extension" version of a straw man fallacy?

Grabbing quick drinks

Inappropriate reference requests from Journal reviewers

Apart from "berlinern", do any other German dialects have a corresponding verb?

The King's new dress



Discord bot python: discord.errors.ClientException: ffmpeg was not found



The Next CEO of Stack OverflowDiscord Bot Python ffmpeg errorDiscord bot: Fix ‘FFMPEG not found’Discord FFmpeg not foundCalling an external command in PythonWhat are metaclasses in Python?Is there a way to run Python on Android?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?How to get the current time in PythonHow can I make a time delay in Python?Does Python have a string 'contains' substring method?










2















I'm trying to make a discord bot that makes music in a voice channel. But it doesn't do that. It connects to the voice channel, but doesn't play anything and it gives an error in the console.



I'm on windows and I'm using the discord.py rewrite.



My code:



import discord, random, datetime, asyncio, nacl, ffmpeg

TOKEN = 'What token'

client = discord.Client()

@client.event
async def on_message(message):
if message.content.lower() == '$play':
if message.content.lower() == '$play':
channel = client.get_channel(547155964328149007)
vc = await channel.connect()
vc.play(discord.FFmpegPCMAudio('mp3.mp3'), after=lambda e: print('done', e))
vc.is_playing()
vc.pause()
vc.resume()
vc.stop()

@client.event
async def on_ready():
print('Logged in as 0.user'.format(client))

client.run(TOKEN)


and the error:



Traceback (most recent call last):
File "D:Python35libsite-packagesdiscordclient.py", line 218, in _run_event
await coro(*args, **kwargs)
File "discord_bot.py", line 90, in on_message
vc.play(discord.FFmpegPCMAudio('mp3.mp3'), after=lambda e: print('done', e))
File "D:Python35libsite-packagesdiscordplayer.py", line 165, in __init__
raise ClientException(executable + ' was not found.') from None
discord.errors.ClientException: ffmpeg was not found.


People seem to have a similar-ish issue with ffmpeg/avconv was not found in your PATH environment variable but the fix for them is to download ffmpeg from a website and put it in their PATH, but that doesn't work. Also my exact error message is different from theirs.



Further more I can only find fixes for my problem in java, while I'm coding the bot in python 3



here are some links from my research:



You need to add FFmpeg to your path



A java fix for the same error



A fix for discord.py, NOT for discord.py REWRITE










share|improve this question


























    2















    I'm trying to make a discord bot that makes music in a voice channel. But it doesn't do that. It connects to the voice channel, but doesn't play anything and it gives an error in the console.



    I'm on windows and I'm using the discord.py rewrite.



    My code:



    import discord, random, datetime, asyncio, nacl, ffmpeg

    TOKEN = 'What token'

    client = discord.Client()

    @client.event
    async def on_message(message):
    if message.content.lower() == '$play':
    if message.content.lower() == '$play':
    channel = client.get_channel(547155964328149007)
    vc = await channel.connect()
    vc.play(discord.FFmpegPCMAudio('mp3.mp3'), after=lambda e: print('done', e))
    vc.is_playing()
    vc.pause()
    vc.resume()
    vc.stop()

    @client.event
    async def on_ready():
    print('Logged in as 0.user'.format(client))

    client.run(TOKEN)


    and the error:



    Traceback (most recent call last):
    File "D:Python35libsite-packagesdiscordclient.py", line 218, in _run_event
    await coro(*args, **kwargs)
    File "discord_bot.py", line 90, in on_message
    vc.play(discord.FFmpegPCMAudio('mp3.mp3'), after=lambda e: print('done', e))
    File "D:Python35libsite-packagesdiscordplayer.py", line 165, in __init__
    raise ClientException(executable + ' was not found.') from None
    discord.errors.ClientException: ffmpeg was not found.


    People seem to have a similar-ish issue with ffmpeg/avconv was not found in your PATH environment variable but the fix for them is to download ffmpeg from a website and put it in their PATH, but that doesn't work. Also my exact error message is different from theirs.



    Further more I can only find fixes for my problem in java, while I'm coding the bot in python 3



    here are some links from my research:



    You need to add FFmpeg to your path



    A java fix for the same error



    A fix for discord.py, NOT for discord.py REWRITE










    share|improve this question
























      2












      2








      2


      3






      I'm trying to make a discord bot that makes music in a voice channel. But it doesn't do that. It connects to the voice channel, but doesn't play anything and it gives an error in the console.



      I'm on windows and I'm using the discord.py rewrite.



      My code:



      import discord, random, datetime, asyncio, nacl, ffmpeg

      TOKEN = 'What token'

      client = discord.Client()

      @client.event
      async def on_message(message):
      if message.content.lower() == '$play':
      if message.content.lower() == '$play':
      channel = client.get_channel(547155964328149007)
      vc = await channel.connect()
      vc.play(discord.FFmpegPCMAudio('mp3.mp3'), after=lambda e: print('done', e))
      vc.is_playing()
      vc.pause()
      vc.resume()
      vc.stop()

      @client.event
      async def on_ready():
      print('Logged in as 0.user'.format(client))

      client.run(TOKEN)


      and the error:



      Traceback (most recent call last):
      File "D:Python35libsite-packagesdiscordclient.py", line 218, in _run_event
      await coro(*args, **kwargs)
      File "discord_bot.py", line 90, in on_message
      vc.play(discord.FFmpegPCMAudio('mp3.mp3'), after=lambda e: print('done', e))
      File "D:Python35libsite-packagesdiscordplayer.py", line 165, in __init__
      raise ClientException(executable + ' was not found.') from None
      discord.errors.ClientException: ffmpeg was not found.


      People seem to have a similar-ish issue with ffmpeg/avconv was not found in your PATH environment variable but the fix for them is to download ffmpeg from a website and put it in their PATH, but that doesn't work. Also my exact error message is different from theirs.



      Further more I can only find fixes for my problem in java, while I'm coding the bot in python 3



      here are some links from my research:



      You need to add FFmpeg to your path



      A java fix for the same error



      A fix for discord.py, NOT for discord.py REWRITE










      share|improve this question














      I'm trying to make a discord bot that makes music in a voice channel. But it doesn't do that. It connects to the voice channel, but doesn't play anything and it gives an error in the console.



      I'm on windows and I'm using the discord.py rewrite.



      My code:



      import discord, random, datetime, asyncio, nacl, ffmpeg

      TOKEN = 'What token'

      client = discord.Client()

      @client.event
      async def on_message(message):
      if message.content.lower() == '$play':
      if message.content.lower() == '$play':
      channel = client.get_channel(547155964328149007)
      vc = await channel.connect()
      vc.play(discord.FFmpegPCMAudio('mp3.mp3'), after=lambda e: print('done', e))
      vc.is_playing()
      vc.pause()
      vc.resume()
      vc.stop()

      @client.event
      async def on_ready():
      print('Logged in as 0.user'.format(client))

      client.run(TOKEN)


      and the error:



      Traceback (most recent call last):
      File "D:Python35libsite-packagesdiscordclient.py", line 218, in _run_event
      await coro(*args, **kwargs)
      File "discord_bot.py", line 90, in on_message
      vc.play(discord.FFmpegPCMAudio('mp3.mp3'), after=lambda e: print('done', e))
      File "D:Python35libsite-packagesdiscordplayer.py", line 165, in __init__
      raise ClientException(executable + ' was not found.') from None
      discord.errors.ClientException: ffmpeg was not found.


      People seem to have a similar-ish issue with ffmpeg/avconv was not found in your PATH environment variable but the fix for them is to download ffmpeg from a website and put it in their PATH, but that doesn't work. Also my exact error message is different from theirs.



      Further more I can only find fixes for my problem in java, while I'm coding the bot in python 3



      here are some links from my research:



      You need to add FFmpeg to your path



      A java fix for the same error



      A fix for discord.py, NOT for discord.py REWRITE







      python ffmpeg






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 21 at 16:17









      S. KloreS. Klore

      142




      142






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You can specify the FFmpeg excecutible directly with the argument executable:



           vc = await channel.connect()
          vc.play(discord.FFmpegPCMAudio(executable="C:/path/ffmpeg.exe", source="mp3.mp3"))





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55284892%2fdiscord-bot-python-discord-errors-clientexception-ffmpeg-was-not-found%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You can specify the FFmpeg excecutible directly with the argument executable:



             vc = await channel.connect()
            vc.play(discord.FFmpegPCMAudio(executable="C:/path/ffmpeg.exe", source="mp3.mp3"))





            share|improve this answer



























              0














              You can specify the FFmpeg excecutible directly with the argument executable:



               vc = await channel.connect()
              vc.play(discord.FFmpegPCMAudio(executable="C:/path/ffmpeg.exe", source="mp3.mp3"))





              share|improve this answer

























                0












                0








                0







                You can specify the FFmpeg excecutible directly with the argument executable:



                 vc = await channel.connect()
                vc.play(discord.FFmpegPCMAudio(executable="C:/path/ffmpeg.exe", source="mp3.mp3"))





                share|improve this answer













                You can specify the FFmpeg excecutible directly with the argument executable:



                 vc = await channel.connect()
                vc.play(discord.FFmpegPCMAudio(executable="C:/path/ffmpeg.exe", source="mp3.mp3"))






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 9 hours ago









                TagiaTagia

                213




                213





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55284892%2fdiscord-bot-python-discord-errors-clientexception-ffmpeg-was-not-found%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript