JonasBonno / docker-discordbot

Discord bot made by Twentysix
https://github.com/Twentysix26/Red-DiscordBot/tree/develop
MIT License
8 stars 3 forks source link

Some Cogs are unable to update due to Python Version out of date #8

Closed neocharles closed 1 year ago

neocharles commented 1 year ago

A couple of cogs which I am trying to utilize (wikipedia and reactchannel) from PCXCogs state they require 3.11.0. From what I can tell, the container is running 3.9

This causes the following error output in the console:

[19:12:41] WARNING  [py.warnings] /root/.local/share/Red-DiscordBot/data/mybot/cogs/CogManager/cogs/wikipedia/__init__.py:16: RuntimeWarning: coroutine 'Red.add_cog' was never awaited
  bot.add_cog(cog)

           ERROR    [red] Package loading failed
╭────────────────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────────────────────────────────────────────────────╮
│ /usr/lib/python3.9/site-packages/redbot/core/core_commands.py:188 in _load                                                                                                                                                            │
│ ❱  188                 await bot.load_extension(spec)                                                                                                                                                                                 │
│ /usr/lib/python3.9/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
JonasBonno commented 1 year ago

Hi @neocharles,

I released a new version today, v3.5.4, which should include python 3.11 due to being based on a more recent version of Alpine.

Docker image: jonasbonno/discordbot:3.5.4

Please try upgrading to it and let me know if that solves the issue.

Thanks.

neocharles commented 1 year ago

I did restart the docker session earlier which updated from 3.5.2 to 3.5.4 - is that just updating the core software of the bot but not the rest of the components necessary?

That said - if the entire docker container needs to be updated, what’s the best path to take to accomplish that?

JonasBonno commented 1 year ago

You will need to change the container to the new version I released today because it uses a newer alpine image as its base. Alternative you must go into your current container and attempt to install python 3.11 but I fear issues due to the older alpine version.

Depending on your system you may use the guide in the README. Note that my image and methode will keep settings but if you installed other coponents they may need to be installed again. Keep a backup just in case.

JonasBonno commented 1 year ago

Hi @neocharles,

I have added a upgrading-section to the README.

Please let me know if you manage to upgrade and if any issues or suggestions you have that could improve the container.