discord.py-self icon indicating copy to clipboard operation
discord.py-self copied to clipboard

Getting error while client.run()

Open shreyaspapi opened this issue 1 year ago • 2 comments

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_super_properties = 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

  • Python v3.11.6-final
  • discord.py-self v2.1.0-alpha
    • discord.py-self metadata: v2.1.0a4814+g4076a3b1
  • aiohttp v3.8.6
  • system info: Linux 6.5.0-10-generic #10-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 13 13:49:38 UTC 2023

Checklist

  • [X] I have searched the open issues for duplicates.
  • [X] I have shared the entire traceback.
  • [X] I am using a user token (and it isn't visible in the code).

Additional Information

No response

shreyaspapi avatar Dec 30 '23 07:12 shreyaspapi

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

ktolis avatar Dec 30 '23 07:12 ktolis

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

Scyye avatar Dec 31 '23 03:12 Scyye

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

dolfies avatar May 15 '24 01:05 dolfies