sdaqo / anipy-cli

Little tool in python to watch and download anime from the terminal (the better way to watch anime). Also applicable as an API
https://sdaqo.github.io/anipy-cli
GNU General Public License v3.0
270 stars 40 forks source link

Discord Presence script doesn't find existing Discord installation when not open #73

Closed Prashanthvsdvn closed 2 years ago

Prashanthvsdvn commented 2 years ago

Describe the bug The script complains about No Discord Installation found when Discord is not open. However, it works fine when Discord is opened and running.

To Reproduce Steps to reproduce the behavior:

  1. Have config to set Discord Presence on
  2. Kill all Discord Instance
  3. Try to run the script

Expected behavior The Program should warn about discord not initialized, especially after closing #71

Info

Name: anipy-cli
Version: 2.4.23
Summary: Little tool in python to watch anime from the terminal (the better way to watch anime)
Home-page: https://github.com/sdaqo/anipy-cli
Author: sdaqo
Author-email: sdaqo.dev@protonmail.com
License: GPL-3.0
Location: c:\python310\lib\site-packages
Requires: better-ffmpeg-progress, bs4, kitsu.py-extended, m3u8, moviepy, pycryptodomex, pypresence, python-dateutil, requests, tqdm
Required-by:

Platform

Additional context Error log of script

Traceback (most recent call last):
  File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Python310\Scripts\anipy-cli.exe\__main__.py", line 4, in <module>
  File "C:\Python310\lib\site-packages\anipy_cli\run_anipy_cli.py", line 2, in <module>
    from anipy_cli import cli
  File "C:\Python310\lib\site-packages\anipy_cli\cli.py", line 38, in <module>
    rpc_client = dc_presence_connect()
  File "C:\Python310\lib\site-packages\anipy_cli\player.py", line 80, in dc_presence_connect
    rpc_client = Presence(CLIENT_ID)
  File "C:\Python310\lib\site-packages\pypresence\presence.py", line 13, in __init__
    super().__init__(*args, **kwargs)
  File "C:\Python310\lib\site-packages\pypresence\baseclient.py", line 28, in __init__
    raise DiscordNotFound
pypresence.exceptions.DiscordNotFound: Could not find Discord installed and running on this machine.
VoidAny commented 2 years ago

Perhaps your anipy-cli was not updated. You can try

pip install git+https://github.com/sdaqo/anipy-cli

That should install the latest version of it from GitHub.

Prashanthvsdvn commented 2 years ago

@Dabbing-Guy I did pull in the changes directly from github. The commit was c4750879f339a71370df7992aaa0458c828fbc8b, which is what was released for fixing #71.

sdaqo commented 2 years ago

You can see in your error message, you still have the old version (Line 80 is not the same as in the new file). I will push this to pypi later anyway so just wait for that.

sdaqo commented 2 years ago

https://pypi.org/project/anipy-cli/2.4.24/ here you go