nwithan8 / PlexDiscordManager

A Discord bot to manage your Plex users
GNU General Public License v3.0
17 stars 5 forks source link

Unable to start the bot #4

Open ItsM3rry opened 3 years ago

ItsM3rry commented 3 years ago

Hello @nwithan8, I have an error while I start the bot:

All requiered modules are installed, but I still avec these errors

With python bot.py (2.7.16) File "bot.py", line 14 async def on_ready(): ^ SyntaxError: invalid syntax

With python3 bot.py (3.7.3)

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 606, in _load_from_module_spec
    spec.loader.exec_module(lib)
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/pi/PlexDiscordManager/plex/plex_manager.py", line 15, in <module>
    from database.database import DiscordMediaServerConnectorDatabase, EmbyUser, PlexUser, JellyfinUser
  File "/home/pi/PlexDiscordManager/database/database.py", line 5, in <module>
    from sqlalchemy import Column, Integer, Unicode, UnicodeText, String, BigInteger, null
ModuleNotFoundError: No module named 'sqlalchemy'

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

Traceback (most recent call last):
  File "bot.py", line 11, in <module>
    bot.load_extension("plex.plex_manager")
  File "/home/pi/.local/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 678, in load_extension
    self._load_from_module_spec(spec, name)
  File "/home/pi/.local/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 609, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'plex.plex_manager' raised an error: ModuleNotFoundError: No module named 'sqlalchemy'
nwithan8 commented 3 years ago

For some reason, your're missing sqlalchemy Try pip3 install sqlalchemy and then rerun the bot with Python 3

ItsM3rry commented 3 years ago

Already done :(

ItsM3rry commented 3 years ago

Just right now: image

nwithan8 commented 3 years ago

Just right now: image

By using pip with Python 2 on your machine, you're installing sqlalchemy to your Python 2 package repository. Use pip3 to install sqlalchemy to your Python 3 package repository.

In fact, just in case, run pip3 install -r requirements.txt to hopefully catch any other potential incompatible packages.

ItsM3rry commented 3 years ago

ok let me try it

ItsM3rry commented 3 years ago

i have to re-edit my settings.py

ItsM3rry commented 3 years ago

Bot started, but for any PM command I'm typing the bot report this:

Something went wrong. Please try again later.

Pukabyte commented 1 year ago

I'm having a similar issue, running this in chronos on unraid. image

nwithan8 commented 1 year ago

@Pukabyte you need to install the Python dependencies via pip install -r requirements.txt. If that doesn't work, import the Discord dependency explicitly via pip install discord.

Please note, this project is deprecated.