pypresence
pypresence copied to clipboard
Could not find Discord installed and running on this machine.
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.
Same with Linux Mint 20.3 on VirtualBox Discord ver: Stable 140355 (cd30e81) Linux 64-Bit (5.4.0-122-Generic)
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!
ok, now that's weird
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.
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.
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()