dolfies / discord.py-self

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

Getting error while client.run() #638

Closed shreyaspapi closed 1 month ago

shreyaspapi commented 6 months ago

Summary

Unable to launch client.run()

Reproduction Steps

Just use the latest version of the package.

Code

No response

Expected Results

It should login

Actual Results

2023-12-30 07:04:54 WARNING discord.utils Info API down. Falling back to manual fetching... Traceback (most recent call last): File "/root/cc-copy/dis-dis/main.py", line 171, in client.run(setup.discord_account_token) File "/root/cc-copy/my_env/lib/python3.11/site-packages/discord/client.py", line 1059, in run asyncio.run(runner()) File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/root/cc-copy/my_env/lib/python3.11/site-packages/discord/client.py", line 1048, in runner await self.start(token, reconnect=reconnect) File "/root/cc-copy/my_env/lib/python3.11/site-packages/discord/client.py", line 978, in start await self.login(token) File "/root/cc-copy/my_env/lib/python3.11/site-packages/discord/client.py", line 820, in login data = await state.http.static_login(token.strip()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/cc-copy/my_env/lib/python3.11/site-packages/discord/http.py", line 1054, in static_login data = await self.get_me() ^^^^^^^^^^^^^^^^^^^ File "/root/cc-copy/my_env/lib/python3.11/site-packages/discord/http.py", line 698, in request await self.startup() File "/root/cc-copy/my_env/lib/python3.11/site-packages/discord/http.py", line 634, in startup self.super_properties, self.encoded_superproperties = sp, = await utils._get_info(session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/cc-copy/my_env/lib/python3.11/site-packages/discord/utils.py", line 1451, in _get_info bn = await _get_build_number(session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/cc-copy/my_env/lib/python3.11/site-packages/discord/utils.py", line 1480, in _get_build_number build_url = 'https://discord.com/assets/' + re.compile(r'assets/+([a-z0-9]+).js').findall(login_page)[-2] + '.js'

System Information

Checklist

Additional Information

No response

ktolis commented 6 months ago

Confirmed bug as of 2+, tested with python 3.9-11, same issue downgraded to release 1.9.2 and it works as expected/advertised again.

probably already fixed in main branch here: https://github.com/dolfies/discord.py-self/commit/cf97a1d1f800d82e28005dbbb2ad1843fd0b7de7

Scyye commented 6 months ago

Possible duplicate of #619 solution at the bottom of that thread.

dolfies commented 1 month ago

Fixed the fallback! The API is back up too. Sorry for the wait guys.