Senophyx / Discord-RPC

An Python wrapper for Discord RPC
https://pypi.org/project/discord-rpc
MIT License
26 stars 9 forks source link

TypeError: DiscordUnix._get_pipe_path() takes 0 positional arguments but 1 was given #11

Closed keisanng closed 7 months ago

keisanng commented 1 year ago
  File "project_path/src/__main__.py", line 15, in main
    RPC = discordrpc.RPC.set_id(app_id=CLIENT_ID)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "project_path/.venv/lib/python3.11/site-packages/discordrpc/presence.py", line 33, in set_id
    return DiscordUnix(app_id)
           ^^^^^^^^^^^^^^^^^^^
  File "project_path/.venv/lib/python3.11/site-packages/discordrpc/presence.py", line 20, in __init__
    self._connect()
  File "project_path/.venv/lib/python3.11/site-packages/discordrpc/presence.py", line 218, in _connect
    pipe_path = self._get_pipe_path()
                ^^^^^^^^^^^^^^^^^^^^^
TypeError: DiscordUnix._get_pipe_path() takes 0 positional arguments but 1 was given
Senophyx commented 11 months ago

Try different version first, check whether the error is still the same

pazkero commented 8 months ago

Same error, using example handbook, discordrpc version 4.0 Python 3.10 Ubuntu 22.04

Python 3.10 is listed as "supported" in https://pypi.org/project/discord-rpc/ from where I used the code.

Proposed patch in #13

Senophyx commented 8 months ago

Same error, using example handbook, discordrpc version 4.0 Python 3.10 Ubuntu 22.04

Linux-based OS has not been fully tested because I only tested it on a virtual machine and only some versions have been tested.

Python 3.10 is listed as "supported" in https://pypi.org/project/discord-rpc/ from where I used the code.

What I meant before was try a different version of Discord-RPC (maybe this is my fault for not providing a complete explanation). I'm sorry.

Proposed patch in #13

Thank you so much for your contributions. I will test the patch you provided as soon as possible. While waiting for the latest version update, you can try installing Discord-RPC using the repo that you have forked which already contains your patch and report to me if all functions (such as in the examples folder) run smoothly.

pazkero commented 8 months ago

Proposed patch in #13

Thank you so much for your contributions. I will test the patch you provided as soon as possible. While waiting for the latest version update, you can try installing Discord-RPC using the repo that you have forked which already contains your patch and report to me if all functions (such as in the examples folder) run smoothly.

image

Yes, I tested it. And yes, it works.

Senophyx commented 8 months ago

Very great! Do all the functions work?

Also, Most likely I will release the latest version next week because I'm still busy right now.

Senophyx commented 7 months ago

Fixed on #13.