corpnewt / CorpBot.py

A very clumsy python bot for discord
MIT License
194 stars 91 forks source link

Updated not but errors no matter what #141

Closed EunolaSims4 closed 2 years ago

EunolaSims4 commented 2 years ago

I have tried everything. CorpBot as is just with Lavalink and my setting_dict and then just my bot and I'm getting the exact same error each time.

Cogs.Settings failed to load!

And

Ignoring exception in on_loaded_extension
Traceback (most recent call last):
  File "C:\Users\shaki\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\shaki\OneDrive\Documents\MesdusaBot---d.py\Cogs\Mute.py", line 66, in on_loaded_extension
    muteList = self.settings.getServerStat(server, "MuteList")
AttributeError: 'NoneType' object has no attribute 'getServerStat'
Gathering invites...
Ignoring exception in on_loaded_extension
Traceback (most recent call last):
  File "C:\Users\shaki\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\shaki\OneDrive\Documents\MesdusaBot---d.py\Cogs\Invite.py", line 91, in on_loaded_extension
    if self.settings.getGlobalStat("AllowServerJoin", True): return # No need to check - not restricting
AttributeError: 'NoneType' object has no attribute 'getGlobalStat'
'NoneType' object has no attribute 'getGlobalStat'

The second is happening for pretty much all of the cogs and I don't know why. It was working fine the day before yesterday. It happens when I start the bot From StartBot.bat and Main.py

So far it's saying for Mute.py, Debugging.py, Stream.py, Invite.py and it's still loading the bot repeating the

AttributeError: 'NoneType' object has no attribute 'getGlobalStat'
'NoneType' object has no attribute 'getGlobalStat'

error for Debugging and Stream

corpnewt commented 2 years ago

Uhh - no reason why the bot shouldn't be able to load the Settings.py Cog. I just tested my local instance on the latest code, and it loads fine here.

-CorpNewt

corpnewt commented 2 years ago

Might make sense to ensure your python and dependencies are up to date?

EunolaSims4 commented 2 years ago

I restarted my computer, updated pycharm and git. It's still doing it

corpnewt commented 2 years ago

Yeah, I'm not sure what could be causing it. It works as intended on my local copy here.

EunolaSims4 commented 2 years ago

I don't know what I did but now it's working with the exception of Lavalink which still gives the


Connection Failure: Cannot connect to host 127.0.0.1:2333 ssl:default [The remote computer refused the network connection]
Error resolving search:
ClientConnectorError(ConnectionKey(host='127.0.0.1', port=2333, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(22, 'The remote computer refused the network connection', None, 1225, None))

Error for the Music cog

camielverdult commented 2 years ago

Might be that your python/shell environment is broken or that your copy of the bot is corrupt. You could try backing up the database and re-pulling the bot to fix the last part. If that doesn't clear your issue, you might consider looking into your py/shell environment.

EunolaSims4 commented 2 years ago

It's on a new py/she'll environment and still gives the error