~nicoco/slidcord#7: 
IndexError: list index out of range

After updating Slidge for Debian to 0.0.0-dev+20231201-git8f1e3bec4d I started receiving this error:

Dec 01 21:49:11 example.com slidge[9166]: :128:RuntimeWarning:'slidge.main' found in sys.modules after import of package 'slidge', but prior to execution of 'slidge.main'; this may result in unpredictable behaviour Dec 01 21:49:11 example.com slidge[9166]: INFO:slidge.util.db:Using existing slidge DB: /var/lib/slidge/slidge-discord.example.com/slidge.db Dec 01 21:49:11 example.com slidge[9166]: INFO:slidge.util.db:Registered users in the DB: ['user2@example.com'] Dec 01 21:49:11 example.com slidge[9166]: INFO:root:Starting slidge version NO_VERSION Dec 01 21:49:11 example.com slidge[9166]: INFO:root:Starting legacy module: 'slidge.plugins.discord' version NO_VERSION Dec 01 21:49:12 example.com slidge[9166]: WARNING:discord.client:PyNaCl is not installed, voice will NOT be supported. Dec 01 21:49:12 example.com slidge[9166]: INFO:slidge.core.gateway.base:Slidge has successfully started Dec 01 21:49:22 example.com slidge[9166]: WARNING:discord.utils:Info API down. Falling back to manual fetching... Dec 01 21:49:23 example.com slidge[9166]: WARNING:slidge.core.gateway.base:Login problem for <User user2@example.com> Dec 01 21:49:23 example.com slidge[9166]: Traceback (most recent call last): Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/slidge/core/gateway/base.py", line 403, in __login_wrap Dec 01 21:49:23 example.com slidge[9166]: status = await session.login() Dec 01 21:49:23 example.com slidge[9166]: ^^^^^^^^^^^^^^^^^^^^^ Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/slidge/plugins/discord/session.py", line 43, in login Dec 01 21:49:23 example.com slidge[9166]: await self.discord.login(token) Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/client.py", line 820, in login Dec 01 21:49:23 example.com slidge[9166]: data = await state.http.static_login(token.strip()) Dec 01 21:49:23 example.com slidge[9166]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/http.py", line 1054, in static_login Dec 01 21:49:23 example.com slidge[9166]: data = await self.get_me() Dec 01 21:49:23 example.com slidge[9166]: ^^^^^^^^^^^^^^^^^^^ Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/http.py", line 698, in request Dec 01 21:49:23 example.com slidge[9166]: await self.startup() Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/http.py", line 634, in startup Dec 01 21:49:23 example.com slidge[9166]: self.super_properties, self.encoded_super_properties = sp, _ = await utils._get_info(session) Dec 01 21:49:23 example.com slidge[9166]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/utils.py", line 1451, in _get_info Dec 01 21:49:23 example.com slidge[9166]: bn = await _get_build_number(session) Dec 01 21:49:23 example.com slidge[9166]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/utils.py", line 1480, in _get_build_number Dec 01 21:49:23 example.com slidge[9166]: build_url = 'https://discord.com/assets/' + re.compile(r'assets/+([a-z0-9]+).js').findall(login_page)[-2] + '.js' Dec 01 21:49:23 example.com slidge[9166]: ~~~~~~~~~~~~^^^^ Dec 01 21:49:23 example.com slidge[9166]: IndexError: list index out of range Dec 01 21:49:23 example.com slidge[9166]: ERROR:slidge.core.gateway.base:list index out of range Dec 01 21:49:23 example.com slidge[9166]: Traceback (most recent call last): Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/slidge/core/gateway/base.py", line 403, in __login_wrap Dec 01 21:49:23 example.com slidge[9166]: status = await session.login() Dec 01 21:49:23 example.com slidge[9166]: ^^^^^^^^^^^^^^^^^^^^^ Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/slidge/plugins/discord/session.py", line 43, in login Dec 01 21:49:23 example.com slidge[9166]: await self.discord.login(token) Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/client.py", line 820, in login Dec 01 21:49:23 example.com slidge[9166]: data = await state.http.static_login(token.strip()) Dec 01 21:49:23 example.com slidge[9166]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/http.py", line 1054, in static_login Dec 01 21:49:23 example.com slidge[9166]: data = await self.get_me() Dec 01 21:49:23 example.com slidge[9166]: ^^^^^^^^^^^^^^^^^^^ Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/http.py", line 698, in request Dec 01 21:49:23 example.com slidge[9166]: await self.startup() Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/http.py", line 634, in startup Dec 01 21:49:23 example.com slidge[9166]: self.super_properties, self.encoded_super_properties = sp, _ = await utils._get_info(session) Dec 01 21:49:23 example.com slidge[9166]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/utils.py", line 1451, in _get_info Dec 01 21:49:23 example.com slidge[9166]: bn = await _get_build_number(session) Dec 01 21:49:23 example.com slidge[9166]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 01 21:49:23 example.com slidge[9166]: File "/usr/lib/slidge/lib/python3.11/site-packages/discord/utils.py", line 1480, in _get_build_number Dec 01 21:49:23 example.com slidge[9166]: build_url = 'https://discord.com/assets/' + re.compile(r'assets/+([a-z0-9]+).js').findall(login_page)[-2] + '.js' Dec 01 21:49:23 example.com slidge[9166]: ~~~~~~~~~~~~^^^^ Dec 01 21:49:23 example.com slidge[9166]: IndexError: list index out of range Dec 01 21:55:37 example.com slidge[9166]: WARNING:discord.utils:Info API down. Falling back to manual fetching...

It also gives that error if a new user tries to register. I'm guessing deleting the database and letting it generate a new one should fix it?

Status
RESOLVED FIXED
Submitter
~qtambaugh
Assigned to
No-one
Submitted
5 months ago
Updated
5 months ago
Labels
No labels applied.

~nicoco 5 months ago

Unfortunately no, it's an upstream issue: https://github.com/dolfies/discord.py-self/issues/619

~qtambaugh 5 months ago ยท edit

On Mon, 2023-12-04 at 08:40 +0000, ~nicoco wrote:

Unfortunately no, it's an upstream issue: https://github.com/dolfies/discord.py-self/issues/619

I added the period to utils.py mentioned here: https://github.com/dolfies/discord.py-self/issues/619#issuecomment-1837276026

That fixed it for me

~nicoco REPORTED FIXED 5 months ago

nicoco referenced this ticket in commit 93aad46.

Register here or Log in to comment, or comment via email.