Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Crash on start-up suddenly happening despite no change to code #1738

Open
4 tasks done
jc-360 opened this issue Sep 12, 2024 · 2 comments
Open
4 tasks done

[BUG] Crash on start-up suddenly happening despite no change to code #1738

jc-360 opened this issue Sep 12, 2024 · 2 comments

Comments

@jc-360
Copy link

jc-360 commented Sep 12, 2024

Library Version

5.13.2

Describe the Bug

In the last 2 days or so, I have not been able to run my bot as it immediately crashes on start-up despite no change to the code in several weeks. The error appears to be within the library's user.py file, as shown in the traceback below.

Steps to Reproduce

This error occurs every time I attempt to run my bot.

Expected Results

I would expect my bot to run as normal.

Minimal Reproducible Code

No response

Traceback

Traceback (most recent call last):
  File "/home/container/main.py", line 273, in <module>
    bot.start("Hidden token")
  File "/home/container/.local/lib/python3.10/site-packages/interactions/client/client.py", line 1008, in start
    asyncio.run(self.astart(token))
  File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/container/.local/lib/python3.10/site-packages/interactions/client/client.py", line 964, in astart
    await self.login(token)
  File "/home/container/.local/lib/python3.10/site-packages/interactions/client/client.py", line 946, in login
    self._user = ClientUser.from_dict(me, self)
  File "/home/container/.local/lib/python3.10/site-packages/interactions/models/discord/base.py", line 36, in from_dict
    data = cls._process_dict(data, client)
  File "/home/container/.local/lib/python3.10/site-packages/interactions/models/discord/user.py", line 170, in _process_dict
    data = super()._process_dict(data, client)
  File "/home/container/.local/lib/python3.10/site-packages/interactions/models/discord/user.py", line 64, in _process_dict
    if not isinstance(data["avatar"], Asset):
TypeError: 'NoneType' object is not subscriptable
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f962c7a90f0>

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.
  • I have attempted to debug this myself, and I believe this issue is with the library

Additional Information

No response

@AstreaTSS
Copy link
Member

This seemingly implies that the /user/@me endpoint was returning nothing, which is... strange. I certainly can't reproduce it. If anyone else has this issue, please do respond.

@jc-360
Copy link
Author

jc-360 commented Sep 12, 2024

This seemingly implies that the /user/@me endpoint was returning nothing, which is... strange. I certainly can't reproduce it. If anyone else has this issue, please do respond.

I believe you are correct, as above the traceback (I should perhaps have included it) is the following:

GET /users/@me Has exceeded its ratelimit (1)! Reset in 0.0 seconds
GET /users/@me Has exceeded its ratelimit (1)! Reset in 0.0 seconds
GET /users/@me Has exceeded its ratelimit (1)! Reset in 0.0 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants