Closed LaughOutQuiet closed 6 years ago
Same problem here
Traceback (most recent call last):
File "C:/Users/leona/OneDrive/Programme/Telegram-Bot-master/tele_news.py", line 15, in
Pls Help
I'll look in to this asap, sorry for the slow reply.
I only get that exception when I call billy-yoyo's example program from a different class. If I run the script by itself it works.
Three things that might be wrong:
auth = r6sapi.Auth(..., max_connect_retries=0)
)Is the error happening every time, or does it sometimes work? The last one is unlikely, unless you've been spamming requests a lot.
@billy-yoyo It has not been happening very often and it tends to happen after i use a few commands in a shorter time period, over 3 minutes i used 10 commands and i got the error after i successfully executed the 10 commands, sorry for responding late, I don't usually check github (kinda forgot I had it) but i will implement the max_connect_retries
EDIT: I've tried to implement the max_connect_retries and it does not seem to be working, could you provide an example for me so I can see if I'm doing something wrong?
EDIT 2:
I believe that the reason max_connect_retries is not working is because of the following:
Now I'm getting this error and I don't know what the source is:
Ignoring exception in command r6 operator
Traceback (most recent call last):
File "C:\Users\Matthew\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\ext\commands\core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "C:\Users\Matthew\Desktop\Projects\Python\Discord\Bots\Series\Laugh (All in one)\cogs\stats.py", line 277, in _operator
p = await self.get_player(player, platform)
File "C:\Users\Matthew\Desktop\Projects\Python\Discord\Bots\Series\Laugh (All in one)\cogs\stats.py", line 90, in get_player
p = await r6sapi.Auth(email=(config["stats"]["email"]),password=(config["stats"]["password"])).get_player(player, plat)
KeyError: 'stats'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Matthew\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\ext\commands\bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "C:\Users\Matthew\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\ext\commands\core.py", line 634, in invoke
yield from ctx.invoked_subcommand.invoke(ctx)
File "C:\Users\Matthew\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\ext\commands\core.py", line 374, in invoke
yield from injected(*ctx.args, **ctx.kwargs)
File "C:\Users\Matthew\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\ext\commands\core.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'stats'
EDIT AGAIN:
sorry i just found the cause of my autism, i renamed a config and forgot to change it in the code ;-;
really sorry about that i tried your fix and it worked my man.
Closing as the issue was fixed, will consider adding better error reporting later so it's more obvious why you're failing to connect, if possible.