vivinano / MudaeAutoBot

python bot that uses strictly the **Discord API** to Roll,Claim,and Kakera Snipe in Mudae. 5/10/21 project converted over to discum library
Apache License 2.0
143 stars 47 forks source link

Getting an Index Error :/ #180

Closed CADIndie closed 2 years ago

CADIndie commented 2 years ago
Traceback (most recent call last):
  File "C:\Python310\lib\site-packages\discum\gateway\gateway.py", line 296, in _response_loop
    func(resp)
  File "C:\Users\CADIndie\Downloads\MudaeAutoBot-main\MudaeAutoBot-main\MudaeAutoBot.py", line 764, in on_message
    c_settings = parse_settings_message(msg)
  File "C:\Users\CADIndie\Downloads\MudaeAutoBot-main\MudaeAutoBot-main\MudaeAutoBot.py", line 226, in parse_settings_message
    settings['prefix'] = val_parse(settings_p[0])[0]
IndexError: list index out of range

Not really sure the reason, also a note that it says it cant find the channel but then proceeds to say it cant find the settings for the channel after I input any command in said channel.

TikaUnas commented 2 years ago

I was having the same issue, especially the part about the settings thing. Except my error was just a bit different than yours. It's been working fine for a while this just started today.

Exception ignored in thread started by: <bound method GatewayServer._response_loop of <discum.gateway.gateway.GatewayServer object at 0x0000025C0A3EB500>> Traceback (most recent call last): File "C:\Users\shaho\AppData\Roaming\Python\Python39\site-packages\discum\gateway\gateway.py", line 299, in _response_loop func(resp) File "D:\Users\shaho\Documents\demon time\bot\MudaeAutoBot.py", line 707, in on_message user = bot.gateway.session.user File "C:\Users\shaho\AppData\Roaming\Python\Python39\site-packages\discum\gateway\session.py", line 42, in user return self.settings_ready['user'] KeyError: 'user'

CADIndie commented 2 years ago

Discum getting updated (or broken) maybe?

vivinano commented 2 years ago

No the 1st issue is a parsing issue the second user error is a error with discum

CADIndie commented 2 years ago

I do Java/C++ lol, only time I ever use Python is for Renpy which is about 10 times a year at most. AKA I don't understand python really at all other than programming it

vivinano commented 2 years ago

It's basically index error in other languages

vivinano commented 2 years ago

It should be your channel data instance doesn't have the bold "*" which makes it fails the regex

CADIndie commented 2 years ago

What do you mean? That kind of confused me lol

vivinano commented 2 years ago

It doesn't fit the regular expression so it is unable to large the value

CADIndie commented 2 years ago

uh, I don't see how that would only affect me as its mudae wide and not just my own bot that changes it

vivinano commented 2 years ago

Reading the error message it is issues with getting the prefix which is the first thing that is parsed

vivinano commented 2 years ago

Basically gonna close issue as haven't heard a response

This issue was a copy and paste issue due to copy not including the bold marks it fails the regular expression used to parse the setting file so the $ prefix want obtained based on default * set up

siddagra commented 1 year ago

It should be your channel data instance doesn't have the bold "*" which makes it fails the regex

what do u even mean by this?

siddagra commented 1 year ago

U say about bold marks or something but it really makes no sense what u are even really talking about and you also don't have a tutorial in the readme to set it up.