TrustyJAID / Trusty-cogs

A variety of utility cogs and fun cogs including Hockey information from the NHL, badge creation from discord user information, starboard for use on Redbot, twitch follow notifications and more.
MIT License
168 stars 119 forks source link

Welcome fails to load #310

Closed Tampa closed 1 year ago

Tampa commented 1 year ago

With Redbot update to 3.5.0 release Welcome cog fails to load.

[08:23:31] WARNING [py.warnings] ../cogs/CogManager/cogs/welcome/init.py:12: RuntimeWarning: coroutine 'Red.add_cog' was never awaited bot.add_cog(n)

       ERROR    [red] Package loading failed

╭──────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────────────────────╮ │ redenv/lib/python3.8/site-packages/redbot/core/core_commands.py:188 in _load │ │ ❱ 188 await bot.load_extension(spec) │ │ redenv/lib/python3.8/site-packages/redbot/core/bot.py:1686 in load_extension │ │ ❱ 1686 await lib.setup(self) │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ TypeError: object NoneType can't be used in 'await' expression

Switching back to previous 3.4.19 via pip it loads fine.

TrustyJAID commented 1 year ago

You need to update the cog for it to load properly.

Tampa commented 1 year ago

I ran repo update twice

repo update Repo update completed successfully. Updated: Trusty-cogs

repo update Trusty-cogs This repo is already up to date.

Information on Trusty-cogs repo: Repo url: https://github.com/TrustyJAID/Trusty-cogs/ Branch: master Made by: TrustyJAID Description: A plethora of potentially useful commands and functions for your bot. Create a starboard, trigger automatic responses, or even create your own fun badges.

load welcome Failed to load the following package: welcome. Check your console or logs for details.

Tampa commented 1 year ago

cog update Cog update completed successfully. Updated: welcome None of the updated cogs were previously loaded. Update complete.

load welcome Loaded welcome.

Then did a restart and:

[08:39:25] ERROR [discord.client] Ignoring exception in on_ready ╭──────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────────────────────╮ │ redenv/lib/python3.8/site-packages/discord/client.py:441 in _run_event │ │ ❱ 441 await coro(*args, **kwargs) │ │ redenv/lib/python3.8/site-packages/redbot/core/_events.py:178 in on_ready │ │ ❱ 178 outdated_red_message, rich_outdated_message = get_outdated_red_messages( │ │ redenv/lib/python3.8/site-packages/redbot/core/_events.py:113 in get_outdated_red_messages │ │ ❱ 113 installed_extras.remove(extra) │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ValueError: list.remove(x): x not in list

And now it's dead.

TrustyJAID commented 1 year ago

See the Red main server at https://discord.gg/red there was a hotfix released to fix that latter issue.

Tampa commented 1 year ago

Bumpy ride, but yeah that works now. Something to the tune of "there are updates available for your cogs" or something might not go amiss here to alert users of the need to update ;)

TrustyJAID commented 1 year ago

Something to the tune of "there are updates available for your cogs" or something might not go amiss here to alert users of the need to update ;)

This has been discussed extensively among the core developers and there isn't a good way to do this with how cogs and the bot is setup. I personally have notifications of all my commits on this repo posted in my cog support channel in the cog support server so people can check there for updates but that is a support channel so updates can get drowned out.