Jerrie-Aries / modmail-plugins

Plugins for modmail-dev/Modmail
GNU General Public License v3.0
6 stars 16 forks source link

[BUG]: utils install in docker fails due to missing /home/username directory #42

Closed laundmo closed 8 months ago

laundmo commented 8 months ago

Bot Version

v4.1.0

Hosting method

Other

Plugins

Extended Utils

Summary

Utils installaion tries to install as user, can't due to no user home folder

What happened?

I'm hosting the Modmail bot in Docker. There is no home folder for the user running the bot, so the installation fails trying to user-install the dependency.

Error Logs

discord.ext.commands.errors.ExtensionFailed: Extension 'plugins.Jerrie-Aries.modmail-plugins.utils-master.utils' raised an error: RuntimeError: Unable to install requirements:
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/home/modmail'
Check the permissions.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/modmailbot/cogs/plugins.py", line 404, in plugins_add
    await self.load_plugin(plugin)
  File "/modmailbot/cogs/plugins.py", line 265, in load_plugin
    raise InvalidPluginError("Cannot load extension, plugin invalid.") from exc
cogs.plugins.InvalidPluginError: Cannot load extension, plugin invalid.

Screenshots

No response

Additional Information

Fix idea: ability to override the venv detection with a ENV var, to use a global install in docker.

laundmo commented 8 months ago

there is a USING_DOCKER env set by the Dockerfile of Modmail which can be used

laundmo commented 8 months ago

nevermind, this is a Modmail side issue: https://github.com/modmail-dev/Modmail/pull/3323