dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
680 stars 162 forks source link

invalid tkn error cause it use discord.py instead discord.py-self #116

Closed FeelsBadMan1 closed 2 years ago

FeelsBadMan1 commented 2 years ago

Summary

running the script cause the issue

Reproduction Steps

i just installed the newest version from discord.py-self and noticed this issue. i think it would be good to replace the importname so you use import selfcord and from selfcord.ext import ... instead of discord so you can have both packages installed at the same time

Code

there is no need for a code as this issue is raised within the lib

Expected Results

i expected it to work fine

Actual Results

not working fine

Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x0000020DAFA76AF0>
Traceback (most recent call last):
  File "D:\Downloads\Python\python 3.9.6\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
  File "D:\Downloads\Python\python 3.9.6\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "D:\Downloads\Python\python 3.9.6\lib\asyncio\base_events.py", line 746, in call_soon
    self._check_closed()
  File "D:\Downloads\Python\python 3.9.6\lib\asyncio\base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

System Information

Checklist

Additional Information

No response

dolfies commented 2 years ago

That exception is not from the library...

FeelsBadMan1 commented 2 years ago

The exception happen, because it somehow use discord.py even tho discord.py-self is installed. i already tried to removing discord and discord.py libary but this threw some now issues. i think a simple solution would be to change the lib import name so it dont conflict with discord and discord.py libary installed.

arfathyahiya commented 2 years ago

I'm using the lib and I don't face any issue like this unless you try to use await bot.logout()

and you can solve it. from this issue

dolfies commented 2 years ago

@FeelsBadMan1 If you uninstalled discord.py (and any variants such as enhanced-discord.py or nextcord), as well as reinstalled discord.py-self, all should be good. If you want a renamed version, use the renamed branch directly from git.

FeelsBadMan1 commented 2 years ago

i still had nextcord installed. it worked when uninstalling however i not want to install, uninstall these packages depending on what i working on i think this is relateable. Is there a better solution so the libarys not conflict each other?

dolfies commented 2 years ago

Yes. virtualenvs, installing the renamed branch through git, or removing the discord alias from nextcord.