#๐Ÿ”’ vlc.exe not found.

21 messages ยท Page 1 of 1 (latest)

quartz willow
#

first off, even tough it gives a error the code still works afterwards.
im trying to make a code wich is basically a gambling system and whenever you get that one certain output
it will play a video.
i am wanting to make it that after the video it plays a mp3 file, but whenever i try it gives the
"ERROR: The process "vlc.exe" not found."
i may be sure what causes this but dont know how to get rid of it.

def playvid(video_file:str):
    print(f"Playing video: {video_file}")

    import subprocess
    subprocess.run(["C:\\Program Files\\VideoLAN\\VLC\\vlc.exe", "--fullscreen","--play-and-exit", "abyssalhunter_opening.mp4"])
    time.sleep(11.2)
    os.system("cmd.exe /c \"taskkill /f /im vlc.exe\"")
    time.sleep (2)
    subprocess.run (["C:\\Program Files\\VideoLAN\\VLC\\vlc.exe","abyssal_hunter_music.mp3"])
rigid snowBOT
#

@quartz willow

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

quartz willow
#

this is a part of the code, not everything

dreamy shuttle
#

can you check what the process name for VLC is, while it's running? tasklist should do it

quartz willow
#

you mean this?

dreamy shuttle
#

yeah, but I guess that's not the problem

#

have you tried killing it manually?

#

(running the command yourself)

#

quick question: if you're already passing --play-and-exit to VLC, why are you killing it later on through taskkill? does it not close automatically?

quartz willow
#

after the video finishes, VLC stays

dreamy shuttle
#

hmmm ok

quartz willow
#

aha! i found it

dreamy shuttle
#

oh really? great!

quartz willow
#

killing the taskkill was the reason

#

now it does not give the error anymore

#

thanks for helping :)

dreamy shuttle
#

:p

quartz willow
#

!close

rigid snowBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.