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

unable to get all the guilds #261

Open
m-cf-b opened this issue Aug 20, 2023 · 25 comments
Open

unable to get all the guilds #261

m-cf-b opened this issue Aug 20, 2023 · 25 comments

Comments

@m-cf-b
Copy link

m-cf-b commented Aug 20, 2023

image

@Nixeld
Copy link

Nixeld commented Aug 22, 2023

I am having the same issue, how do i get a dump of all my guilds? I have pasted the full error output below.

File Not Found using Different Method
It seems like you were unable to get all the guilds you are in please obtain your users settings
Please get a dump of all your guilds and put it in the userfolder
Exception ignored in thread started by: <bound method GatewayServer._response_loop of <discum.gateway.gateway.GatewayServer object at 0x7f8d4a943220>>
Traceback (most recent call last):
  File "/home/runner/MudaeAutoBot/venv/lib/python3.10/site-packages/discum/gateway/gateway.py", line 299, in _response_loop
    func(resp)
  File "MudaeAutoBot.py", line 810, in on_message
    for gid, guild in guilds.items():
UnboundLocalError: local variable 'guilds' referenced before assignment```

@RestumpY
Copy link

Same,

Reading from UserFile
It seems like you were unable to get all the guilds you are in please obtain your users settings
Please get a dump of all your guilds and put it in the userfolder
Exception ignored in thread started by: <bound method GatewayServer._response_loop of <discum.gateway.gateway.GatewayServer object at 0x000001E8AE9F62B0>>
Traceback (most recent call last):
File "C:\Users\yanni\AppData\Local\Programs\Python\Python311\Lib\site-packages\discum\gateway\gateway.py", line 299, in _response_loop
func(resp)
File "C:\Users\yanni\Desktop\MudaeAutoBot-main\MudaeAutoBot.py", line 808, in on_message
for gid, guild in guilds.items():
^^^^^^
UnboundLocalError: cannot access local variable 'guilds' where it is not associated with a value

@m3t4f1v3
Copy link

m3t4f1v3 commented Sep 5, 2023

use python -m pip install --user --upgrade git+https://github.com/Merubokkusu/Discord-S.C.U.M.git#egg=discum

@StuckInLimbo
Copy link

Same issue, fresh install. Using discum from git and no changes.

@amenslama30
Copy link

@vivinano help please

Reading from UserFile
It seems like you were unable to get all the guilds you are in please obtain your users settings
Please get a dump of all your guilds and put it in the userfolder
Exception ignored in thread started by: <bound method GatewayServer._response_loop of <discum.gateway.gateway.GatewayServer object at 0x00000168C31DB6E0>>
Traceback (most recent call last):
File "C:\Python312\Lib\site-packages\discum\gateway\gateway.py", line 299, in _response_loop
func(resp)
File "C:\Users\amens\Desktop\MudaeAutoBot-main\MudaeAutoBot.py", line 808, in on_message
for gid, guild in guilds.items():
^^^^^^
UnboundLocalError: cannot access local variable 'guilds' where it is not associated with a value

@vivinano
Copy link
Owner

vivinano commented Oct 28, 2023 via email

@VineST
Copy link

VineST commented Nov 2, 2023

@vivinano What should be the filename for the guild information? exguilds.txt appears to contain examples.

@vivinano
Copy link
Owner

vivinano commented Nov 3, 2023 via email

@VineST
Copy link

VineST commented Nov 3, 2023

Thanks; I filled out some info into a guilds.txt based on the example earlier with no dice. Tried changing it to uppercase but there's no effect. I also tried adding some user data into user.txt but that hasn't affected anything.
e: Based on the source code it is looking for a guild.txt, not guilds.txt.
I managed to read that guild.txt, but it is having trouble loading them into the requisite objects:
image

@Nixeld
Copy link

Nixeld commented Nov 5, 2023

Thanks; I filled out some info into a guilds.txt based on the example earlier with no dice. Tried changing it to uppercase but there's no effect. I also tried adding some user data into user.txt but that hasn't affected anything. e: Based on the source code it is looking for a guild.txt, not guilds.txt. I managed to read that guild.txt, but it is having trouble loading them into the requisite objects: image

image
image
Add in the json.loads()
This will convert it from a string to a dictionary

Replace all the following in user.txt and guild.txt
None to null
True to true
False to false

@VineST
Copy link

VineST commented Nov 5, 2023

Thank you! In addition to what you stated above, I also had to replace all single quotes in user.txt with double quotes and remove terminal commas in the guilds json.

I got it running and it actually somehow managed to roll once before failing due to using an outdated key in my settings file. I started the bot again with the same outdated key and it rolled once, claimed due to >500ka, and stopped again.
Here's the errors with the outdated key:
image
They are about what one would expect; the curious part is how it managed to roll at all despite me being on a new session.

Thus, I tried loading my new auth key. But now, the bot does nothing after being started and does not log any text, only displaying this message after being force quit:
image

@vivinano
Copy link
Owner

vivinano commented Nov 6, 2023 via email

@Nixeld
Copy link

Nixeld commented Nov 8, 2023

Thank you! In addition to what you stated above, I also had to replace all single quotes in user.txt with double quotes and remove terminal commas in the guilds json.

Yeah I forgot to add that as well. Good that you were able to pick up on that problem.

I got it running and it actually somehow managed to roll once before failing due to using an outdated key in my settings file. I started the bot again with the same outdated key and it rolled once, claimed due to >500ka, and stopped again. Here's the errors with the outdated key: image They are about what one would expect; the curious part is how it managed to roll at all despite me being on a new session.

Thus, I tried loading my new auth key. But now, the bot does nothing after being started and does not log any text, only displaying this message after being force quit: image

Replace all bot.gateway.session.user with user.
This will stop the script from retrieving user information using the session gateway and retrieve from the user file instead.

@VineST
Copy link

VineST commented Nov 8, 2023

Thanks for the tips on filtering more of those user sessions—do you have any advice as to why it's freezing during regular use now? The bot soft locks at bot.gateway.run(auto_reconnect=True) and can only be halted with CTRL+C. (screenshot in the previous post)

@vivinano
Copy link
Owner

vivinano commented Nov 8, 2023 via email

@Nixeld
Copy link

Nixeld commented Nov 8, 2023

Thanks for the tips on filtering more of those user sessions—do you have any advice as to why it's freezing during regular use now? The bot soft locks at bot.gateway.run(auto_reconnect=True) and can only be halted with CTRL+C. (screenshot in the previous post)

Not sure what's causing that, you can try changing console to True and see what comes out in the console.
image

@VineST
Copy link

VineST commented Nov 8, 2023

Thanks for the tips on filtering more of those user sessions—do you have any advice as to why it's freezing during regular use now? The bot soft locks at bot.gateway.run(auto_reconnect=True) and can only be halted with CTRL+C. (screenshot in the previous post)

Not sure what's causing that, you can try changing console to True and see what comes out in the console. image

Thank you, this verbose logging is great—seems it's a different variety of authentication failure and I was using a malformed token!

I also had to comment this block out:
image
as part of the discum user API skipping.

The only issues I'm now experiencing are minor, such as the bot missing one roll (slash commands often fail once during a roll batch even as a human, so I assume the bot is experiencing the same thing), as well as the lack of kakera button sniping (a common issue reported multiple times that likely isn't slated to be fixed). I don't mind that much since I'm just using the bot to grind keys in a largely abandoned server.

@vivinano
Copy link
Owner

vivinano commented Nov 8, 2023 via email

@VineST
Copy link

VineST commented Nov 8, 2023

I'm slowly working to try debugging the button interface for kakera with my limited knowledge, since the wished rolls also use buttons and I haven't seen complaints about those not working (although I haven't actually tested it myself since my wishlist is all claimed characters for key gains).

@vivinano
Copy link
Owner

vivinano commented Nov 8, 2023 via email

@Nixeld
Copy link

Nixeld commented Nov 9, 2023

I'm slowly working to try debugging the button interface for kakera with my limited knowledge, since the wished rolls also use buttons and I haven't seen complaints about those not working (although I haven't actually tested it myself since my wishlist is all claimed characters for key gains).

#246 (comment)
A quick fix for clicking on kakera button but without the check for kakera wall.

@vivinano
Copy link
Owner

feel free to put in the pull request so the changes can be applied universally as i dont have much time to make the required changes but i sure can push a button =D

@Ian99559999898
Copy link

can one of you guys help me im dying out here

@m3t4f1v3
Copy link

m3t4f1v3 commented Apr 4, 2024

can one of you guys help me im dying out here

with what

@Nixeld
Copy link

Nixeld commented May 20, 2024

feel free to put in the pull request so the changes can be applied universally as i dont have much time to make the required changes but i sure can push a button =D

I don't mind opening a pull request but I have made a couple of changes to the code and most of them are just workarounds or quick fixes so it is kind of messy. Overall tried to keep most of the code unchanged while making sure that all the features are still working.

If you are fine with that then I will go ahead and open a pull request documenting the changes.

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

9 participants