pypresence icon indicating copy to clipboard operation
pypresence copied to clipboard

Could not find Discord installed and running on this machine.

Open Jmarks199 opened this issue 3 years ago • 1 comments

Starting about 2 weeks ago, I started getting the exception pypresence.exceptions.DiscordNotFound while running on the latest Debian docker container. I didn't change anything else, but the latest Discord is always downloaded each day. I've verified that Discord is installed, running, and I am logged in. Are there any other debugging steps I can do? It seems to be working on my Windows machine just fine.

Jmarks199 avatar Jun 13 '22 21:06 Jmarks199

Same with Linux Mint 20.3 on VirtualBox Discord ver: Stable 140355 (cd30e81) Linux 64-Bit (5.4.0-122-Generic)

NoPlagiarism avatar Aug 08 '22 10:08 NoPlagiarism

This issue just started for me, but on a regular Windows install! It worked fine literally a few days ago, but as of now, all programs that depend on pypresence no longer work!

8bit-coder avatar Nov 21 '22 03:11 8bit-coder

ok, now that's weird

NoPlagiarism avatar Nov 21 '22 14:11 NoPlagiarism

Another update: Weirdly enough, the issue seems to come and go. I can't seem to reproduce it, but every time it happens, the logs of programs that depend on it just say that it can't find discord active and running, even though it is. It's really bizarre.

Edit: Also, restarting Discord, the computer, or any sort of relaunching programs doesn't mitigate the issue. It legitimately comes and goes randomly.

8bit-coder avatar Nov 29 '22 07:11 8bit-coder

Are there any more updates on this issue?

PS: The issue happens solely due to Discord clients and since the endpoint the module uses is undocumented, issues are bound to happen. No use of raising the issue in Discord Developers Server because again, its undocumented. That is why Restarting the client is suggested since the issue it fixes many times.

Hunter2809 avatar Dec 20 '22 17:12 Hunter2809

Previously, DiscordNotFound would only be raised when initializing a Presence or Client object. Latest commit will now check (and potentially raise) each time you start a handshake e.g. RPC.connect().

You can add your own logic for handling this by catching the exceptions raised by update() and connect()

TheSpookyCat avatar May 26 '23 08:05 TheSpookyCat